Class: ConstantContact::Components::EventSpot::Guest
- Defined in:
- lib/constantcontact/components/event_spot/guest.rb
Instance Attribute Summary collapse
-
#guest_id ⇒ Object
Returns the value of attribute guest_id.
-
#guest_section ⇒ Object
Returns the value of attribute guest_section.
Class Method Summary collapse
-
.create(props) ⇒ Guest
Factory method to create a Guest object from a hash.
Methods inherited from Component
#to_hash, to_hash_value, #to_json
Instance Attribute Details
#guest_id ⇒ Object
Returns the value of attribute guest_id
11 12 13 |
# File 'lib/constantcontact/components/event_spot/guest.rb', line 11 def guest_id @guest_id end |
#guest_section ⇒ Object
Returns the value of attribute guest_section
11 12 13 |
# File 'lib/constantcontact/components/event_spot/guest.rb', line 11 def guest_section @guest_section end |
Class Method Details
.create(props) ⇒ Guest
Factory method to create a Guest object from a hash
16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/constantcontact/components/event_spot/guest.rb', line 16 def self.create(props) obj = Guest.new props.each do |key, value| key = key.to_s if key == 'guest_section' obj.send("#{key}=", Components::EventSpot::GuestSection.create(value)) else obj.send("#{key}=", value) if obj.respond_to?("#{key}=") end end obj end |