Class: Ali::Option
- Inherits:
-
Object
- Object
- Ali::Option
- Defined in:
- lib/ali/option.rb
Instance Attribute Summary collapse
-
#flag ⇒ Object
readonly
Returns the value of attribute flag.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#values ⇒ Object
readonly
Returns the value of attribute values.
Instance Method Summary collapse
-
#initialize(name: nil, description: nil, flag: nil, values: []) ⇒ Option
constructor
A new instance of Option.
Constructor Details
#initialize(name: nil, description: nil, flag: nil, values: []) ⇒ Option
Returns a new instance of Option.
6 7 8 9 10 11 |
# File 'lib/ali/option.rb', line 6 def initialize(name: nil, description: nil, flag: nil, values: []) @name = name @description = description @flag = flag @values = values || Set.new(values).to_a end |
Instance Attribute Details
#flag ⇒ Object (readonly)
Returns the value of attribute flag.
4 5 6 |
# File 'lib/ali/option.rb', line 4 def flag @flag end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/ali/option.rb', line 4 def name @name end |
#values ⇒ Object (readonly)
Returns the value of attribute values.
4 5 6 |
# File 'lib/ali/option.rb', line 4 def values @values end |