Class: Tabry::Models::Arg
- Inherits:
-
ArgBase
- Object
- ConfigObject
- ArgBase
- Tabry::Models::Arg
- Defined in:
- lib/tabry/models/arg.rb
Constant Summary collapse
- FIELDS =
{ name: :string, options: [:list_object, :OptionsList], optional: :boolean, description: :string, varargs: :boolean, title: :string, }.freeze
Instance Attribute Summary
Attributes inherited from ConfigObject
Class Method Summary collapse
Instance Method Summary collapse
- #flatten ⇒ Object
- #title ⇒ Object
-
#varargs? ⇒ Boolean
Alias (more clear intention).
Methods inherited from ConfigObject
as_json, #as_json, #assert_of_class, #init_field_boolean, #init_field_list_object, #init_field_object, #init_field_string, #init_field_string_array, #initialize, #inspect, #to_s
Constructor Details
This class inherits a constructor from Tabry::Models::ConfigObject
Class Method Details
.new(**args) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/tabry/models/arg.rb', line 10 def self.new(**args) if args[:raw]["include"] IncludeArg.new(**args) else super(**args) end end |
Instance Method Details
#flatten ⇒ Object
29 30 31 |
# File 'lib/tabry/models/arg.rb', line 29 def flatten self end |
#title ⇒ Object
38 39 40 |
# File 'lib/tabry/models/arg.rb', line 38 def title @title || name end |
#varargs? ⇒ Boolean
Alias (more clear intention)
34 35 36 |
# File 'lib/tabry/models/arg.rb', line 34 def varargs? varargs end |