Class: Ali::Option

Inherits:
Object
  • Object
show all
Defined in:
lib/ali/option.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#flagObject (readonly)

Returns the value of attribute flag.



4
5
6
# File 'lib/ali/option.rb', line 4

def flag
  @flag
end

#nameObject (readonly)

Returns the value of attribute name.



4
5
6
# File 'lib/ali/option.rb', line 4

def name
  @name
end

#valuesObject (readonly)

Returns the value of attribute values.



4
5
6
# File 'lib/ali/option.rb', line 4

def values
  @values
end