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: true, default: nil) ⇒ ArgumentDefinition
constructor
A new instance of ArgumentDefinition.
Constructor Details
#initialize(name, type = String, description: nil, required: true, default: nil) ⇒ ArgumentDefinition
Returns a new instance of ArgumentDefinition.
7 8 9 10 11 12 13 |
# File 'lib/ergane/argument_definition.rb', line 7 def initialize(name, type = String, description: nil, required: true, 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 |