Module: MusixMatch::Models::Model::ClassMethods
- Defined in:
- lib/musix_match/models/model.rb
Instance Method Summary collapse
Instance Method Details
#get(item_id) ⇒ Object
15 16 17 |
# File 'lib/musix_match/models/model.rb', line 15 def get(item_id) API::Finder.send("find_#{self.name.split('::').last.downcase}", item_id) end |
#model_with_attributes(*attributes) ⇒ Object
10 11 12 13 |
# File 'lib/musix_match/models/model.rb', line 10 def model_with_attributes(*attributes) attr_accessor(*attributes) ModelBuilder.build_constructor(self, *attributes) end |