class GatherContent::Config::Element::OtherOption

Attributes

label[RW]
name[RW]
selected[RW]
value[RW]

Public Class Methods

new(name = nil, label = nil, selected = nil, value = nil) click to toggle source
# File lib/gather_content/config/elements/other_option.rb, line 9
def initialize(name = nil, label = nil, selected = nil, value = nil)
  super(name, label, selected)
  @value = value
end

Public Instance Methods

serialize(options = nil) click to toggle source
# File lib/gather_content/config/elements/other_option.rb, line 14
def serialize(options = nil)
  base = super(options)

  value = !!selected ? self.value : ""

  base.merge({
    value: value
  })
end