Class: Siilar::Struct::Base
- Inherits:
-
Object
- Object
- Siilar::Struct::Base
- Defined in:
- lib/siilar/struct.rb
Direct Known Subclasses
Album, Artist, Radio, Suggestion, Tag, TagCollection, TemporaryTrack, Track, User
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(attributes = {}) ⇒ Base
Returns a new instance of Base.
5 6 7 8 9 10 |
# File 'lib/siilar/struct.rb', line 5 def initialize(attributes = {}) attributes.each do |key, value| m = "#{key}=".to_sym self.send(m, value) if self.respond_to?(m) end end |