Class: Bake::Option

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(param, arg, &f) ⇒ Option

Returns a new instance of Option.



5
6
7
8
9
10
# File 'lib/common/options/option.rb', line 5

def initialize(param, arg, &f)
  @param = param
  @arg = arg # true / false

  @block = f
  f
end

Instance Attribute Details

#argObject (readonly)

Returns the value of attribute arg.



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

def arg
  @arg
end

#blockObject (readonly)

Returns the value of attribute block.



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

def block
  @block
end

#paramObject (readonly)

Returns the value of attribute param.



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

def param
  @param
end