Class: Ergane::ArgumentDefinition
- Defined in:
- lib/ergane/argument_definition.rb
Instance Attribute Summary collapse
-
#default ⇒ Object
readonly
Returns the value of attribute default.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#required ⇒ Object
readonly
Returns the value of attribute required.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(name, type = String, description: nil, required: nil, default: nil) ⇒ ArgumentDefinition
constructor
requireddefaults to nil, meaning “derive from the run signature”; pass true/false to force it.
Constructor Details
#initialize(name, type = String, description: nil, required: nil, default: nil) ⇒ ArgumentDefinition
required defaults to nil, meaning “derive from the run signature”; pass true/false to force it.
9 10 11 12 13 14 15 |
# File 'lib/ergane/argument_definition.rb', line 9 def initialize(name, type = String, description: nil, required: nil, default: nil) @name = name.to_sym @type = type @description = description @required = required @default = default end |
Instance Attribute Details
#default ⇒ Object (readonly)
Returns the value of attribute default.
5 6 7 |
# File 'lib/ergane/argument_definition.rb', line 5 def default @default end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
5 6 7 |
# File 'lib/ergane/argument_definition.rb', line 5 def description @description end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/ergane/argument_definition.rb', line 5 def name @name end |
#required ⇒ Object (readonly)
Returns the value of attribute required.
5 6 7 |
# File 'lib/ergane/argument_definition.rb', line 5 def required @required end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
5 6 7 |
# File 'lib/ergane/argument_definition.rb', line 5 def type @type end |