class ConstantContact::Components::EventSpot::GuestSection
Attributes
fields[RW]
label[RW]
Public Class Methods
create(props)
click to toggle source
Factory method to create a GuestSection
object from a hash @param [Hash] props - hash of properties to create object from @return [GuestSection]
# File lib/constantcontact/components/event_spot/guest_section.rb, line 16 def self.create(props) obj = GuestSection.new props.each do |key, value| key = key.to_s if key == 'fields' value ||= [] obj.fields = value.collect do |field| Components::EventSpot::RegistrantField.create(field) end else obj.send("#{key}=", value) if obj.respond_to? key end end if props obj end