class GatherContent::DSL::Option
Public Class Methods
new(choice)
click to toggle source
# File lib/gather_content/dsl/option.rb, line 7 def initialize(choice) @option = GatherContent::Config::Element::Option.new if choice.options.last.instance_of?(GatherContent::Config::Element::OtherOption) choice.options.insert(-2, @option) else choice.options << @option end end
Public Instance Methods
label(label)
click to toggle source
# File lib/gather_content/dsl/option.rb, line 20 def label(label) @option.label = label end
name(name)
click to toggle source
# File lib/gather_content/dsl/option.rb, line 16 def name(name) @option.name = name end
selected(selected)
click to toggle source
# File lib/gather_content/dsl/option.rb, line 24 def selected(selected) @option.selected = selected end