Class: Boxspring::Base
- Inherits:
-
ActiveHash::Base
- Object
- ActiveHash::Base
- Boxspring::Base
- Defined in:
- lib/boxspring/base.rb
Direct Known Subclasses
Attribution, Card, Page, Picture, Property, Reaction, Service, Show, Sponsor, Story, Tag, TagCollection, Theme, ThemeEnvironment, UserAgent
Instance Method Summary collapse
-
#initialize(attributes = {}) {|_self| ... } ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(attributes = {}) {|_self| ... } ⇒ Base
Returns a new instance of Base.
5 6 7 8 9 10 11 12 |
# File 'lib/boxspring/base.rb', line 5 def initialize( attributes = {} ) attributes.symbolize_keys! @attributes = attributes attributes.dup.each do | key, value | send( "#{key}=", value ) if respond_to?( "#{key}=" ) end yield self if block_given? end |