Class: Foobara::Manifest::Command
Constant Summary
TruncatedInspect::MAX_LENGTH
Instance Attribute Summary
Attributes inherited from BaseManifest
#manifest_path, #root_manifest
Instance Method Summary
collapse
#==, #[], category_to_manifest_class, #domain, #domain_reference, #eql?, #find_type, #global_domain, #global_organization, #hash, #initialize, #key?, #method_missing, optional_key, #optional_key?, optional_key_defaults, optional_keys, #organization, #parent, #parent_category, #parent_name, #path, #relevant_manifest, #respond_to_missing?, #scoped_category, #symbol_path
#inspect, truncating
Instance Method Details
#command_manifest ⇒ Object
12
13
14
|
# File 'projects/manifest/src/command.rb', line 12
def command_manifest
relevant_manifest
end
|
#command_name ⇒ Object
16
17
18
|
# File 'projects/manifest/src/command.rb', line 16
def command_name
scoped_short_name
end
|
#errors_types_depended_on ⇒ Object
62
63
64
65
66
|
# File 'projects/manifest/src/command.rb', line 62
def errors_types_depended_on
@errors_types_depended_on ||= self[:errors_types_depended_on]&.to_set do |type_reference|
Type.new(root_manifest, [:type, type_reference])
end || Set.new
end
|
#full_command_name ⇒ Object
20
21
22
|
# File 'projects/manifest/src/command.rb', line 20
def full_command_name
scoped_full_name
end
|
28
29
30
|
# File 'projects/manifest/src/command.rb', line 28
def inputs_type
Attributes.new(root_manifest, [*manifest_path, :inputs_type])
end
|
50
51
52
53
54
|
# File 'projects/manifest/src/command.rb', line 50
def inputs_types_depended_on
@inputs_types_depended_on ||= self[:inputs_types_depended_on]&.map do |type_reference|
Type.new(root_manifest, [:type, type_reference])
end || []
end
|
#possible_errors ⇒ Object
38
39
40
41
42
|
# File 'projects/manifest/src/command.rb', line 38
def possible_errors
(super || {}).keys.to_h do |key|
[key, PossibleError.new(root_manifest, [*manifest_path, :possible_errors, key])]
end
end
|
#query? ⇒ Boolean
24
25
26
|
# File 'projects/manifest/src/command.rb', line 24
def query?
self[:is_query]
end
|
#requires_authentication? ⇒ Boolean
8
9
10
|
# File 'projects/manifest/src/command.rb', line 8
def requires_authentication?
!!self[:requires_authentication]
end
|
#result_types_depended_on ⇒ Object
56
57
58
59
60
|
# File 'projects/manifest/src/command.rb', line 56
def result_types_depended_on
@result_types_depended_on ||= self[:result_types_depended_on]&.to_set do |type_reference|
Type.new(root_manifest, [:type, type_reference])
end || Set.new
end
|
#types_depended_on ⇒ Object
44
45
46
47
48
|
# File 'projects/manifest/src/command.rb', line 44
def types_depended_on
@types_depended_on ||= self[:types_depended_on]&.map do |type_reference|
Type.new(root_manifest, [:type, type_reference])
end || []
end
|