Class: GatherContent::DSL::OtherOption

Inherits:
Option
  • Object
show all
Defined in:
lib/gather_content/dsl/other_option.rb

Instance Method Summary collapse

Methods inherited from Option

#label, #name, #selected

Constructor Details

#initialize(choice) ⇒ OtherOption

Returns a new instance of OtherOption.



7
8
9
10
11
# File 'lib/gather_content/dsl/other_option.rb', line 7

def initialize(choice)
  @option = GatherContent::Config::Element::OtherOption.new
  choice.other_option = true
  choice.options << @option
end

Instance Method Details

#value(value) ⇒ Object



13
14
15
# File 'lib/gather_content/dsl/other_option.rb', line 13

def value(value)
  @option.value = value
end