Class: Musicbrainz::Relation
- Inherits:
-
Object
- Object
- Musicbrainz::Relation
- Defined in:
- lib/wrapper/resources/relation.rb
Instance Attribute Summary collapse
-
#artist ⇒ Object
Returns the value of attribute artist.
-
#attributes ⇒ Object
Returns the value of attribute attributes.
-
#begin ⇒ Object
Returns the value of attribute begin.
-
#direction ⇒ Object
Returns the value of attribute direction.
-
#end ⇒ Object
Returns the value of attribute end.
-
#ended ⇒ Object
Returns the value of attribute ended.
-
#recording ⇒ Object
Returns the value of attribute recording.
-
#type ⇒ Object
Returns the value of attribute type.
-
#type_id ⇒ Object
Returns the value of attribute type_id.
-
#work ⇒ Object
Returns the value of attribute work.
Instance Method Summary collapse
- #child_initializers ⇒ Object
-
#initialize(args) ⇒ Relation
constructor
A new instance of Relation.
Constructor Details
#initialize(args) ⇒ Relation
Returns a new instance of Relation.
5 6 7 8 9 10 |
# File 'lib/wrapper/resources/relation.rb', line 5 def initialize args args.each do |k, v| instance_variable_set("@#{k.gsub('-', '_')}", v) unless v.nil? end self.child_initializers end |
Instance Attribute Details
#artist ⇒ Object
Returns the value of attribute artist.
3 4 5 |
# File 'lib/wrapper/resources/relation.rb', line 3 def artist @artist end |
#attributes ⇒ Object
Returns the value of attribute attributes.
3 4 5 |
# File 'lib/wrapper/resources/relation.rb', line 3 def attributes @attributes end |
#begin ⇒ Object
Returns the value of attribute begin.
3 4 5 |
# File 'lib/wrapper/resources/relation.rb', line 3 def begin @begin end |
#direction ⇒ Object
Returns the value of attribute direction.
3 4 5 |
# File 'lib/wrapper/resources/relation.rb', line 3 def direction @direction end |
#end ⇒ Object
Returns the value of attribute end.
3 4 5 |
# File 'lib/wrapper/resources/relation.rb', line 3 def end @end end |
#ended ⇒ Object
Returns the value of attribute ended.
3 4 5 |
# File 'lib/wrapper/resources/relation.rb', line 3 def ended @ended end |
#recording ⇒ Object
Returns the value of attribute recording.
3 4 5 |
# File 'lib/wrapper/resources/relation.rb', line 3 def recording @recording end |
#type ⇒ Object
Returns the value of attribute type.
3 4 5 |
# File 'lib/wrapper/resources/relation.rb', line 3 def type @type end |
#type_id ⇒ Object
Returns the value of attribute type_id.
3 4 5 |
# File 'lib/wrapper/resources/relation.rb', line 3 def type_id @type_id end |
#work ⇒ Object
Returns the value of attribute work.
3 4 5 |
# File 'lib/wrapper/resources/relation.rb', line 3 def work @work end |
Instance Method Details
#child_initializers ⇒ Object
12 13 14 15 16 |
# File 'lib/wrapper/resources/relation.rb', line 12 def child_initializers self.recording = Musicbrainz::Recording.new(self.recording) if self.recording self.artist = Musicbrainz::Artist.new(self.artist) if self.artist self.work = Musicbrainz::Work.new(self.work) if self.work end |