Class: SanUltari::CommandParameter
- Inherits:
-
Object
- Object
- SanUltari::CommandParameter
- Defined in:
- lib/sanultari/command_parameter.rb
Instance Attribute Summary collapse
-
#default ⇒ Object
readonly
Returns the value of attribute default.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#order ⇒ Object
readonly
Returns the value of attribute order.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(name, options = nil) ⇒ CommandParameter
constructor
A new instance of CommandParameter.
- #require? ⇒ Boolean
Constructor Details
#initialize(name, options = nil) ⇒ CommandParameter
Returns a new instance of CommandParameter.
4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/sanultari/command_parameter.rb', line 4 def initialize name, = nil if @default = [:default] @type = [:type] @type ||= :accessor @require = [:require] @require ||= true if @type == :parameter @order = [:order] @order ||= -1 end end @name = name end |
Instance Attribute Details
#default ⇒ Object (readonly)
Returns the value of attribute default.
2 3 4 |
# File 'lib/sanultari/command_parameter.rb', line 2 def default @default end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
2 3 4 |
# File 'lib/sanultari/command_parameter.rb', line 2 def name @name end |
#order ⇒ Object (readonly)
Returns the value of attribute order.
2 3 4 |
# File 'lib/sanultari/command_parameter.rb', line 2 def order @order end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
2 3 4 |
# File 'lib/sanultari/command_parameter.rb', line 2 def type @type end |
Instance Method Details
#require? ⇒ Boolean
19 20 21 |
# File 'lib/sanultari/command_parameter.rb', line 19 def require? @require end |