Method: FactoryForm::DescriptiveContent#initialize

Defined in:
lib/factoryform/descriptive_content.rb

#initialize(options = {}) ⇒ DescriptiveContent

Returns a new instance of DescriptiveContent.



6
7
8
9
10
11
12
# File 'lib/factoryform/descriptive_content.rb', line 6

def initialize(options = {})
  unless options.empty? || options[:id].empty? || options[:label].empty?
    @id, @label, @value = options[:id], options[:label], options[:value] || options[:label]
  else
    raise(ParameterExpectedException, "Missing ID and label")
  end
end