Class: Decibel::Work
- Inherits:
-
Object
- Object
- Decibel::Work
- Defined in:
- lib/wrapper/resources/work.rb
Instance Attribute Summary collapse
-
#Id ⇒ Object
Returns the value of attribute Id.
-
#Participations ⇒ Object
Returns the value of attribute Participations.
-
#Title ⇒ Object
Returns the value of attribute Title.
-
#Tracks ⇒ Object
Returns the value of attribute Tracks.
Instance Method Summary collapse
-
#initialize(args) ⇒ Work
constructor
A new instance of Work.
- #participations_initialize ⇒ Object
Constructor Details
#initialize(args) ⇒ Work
Returns a new instance of Work.
5 6 7 8 9 10 |
# File 'lib/wrapper/resources/work.rb', line 5 def initialize args args.each do |k, v| instance_variable_set("@#{k}", v) unless v.nil? end self.participations_initialize if self.Participations end |
Instance Attribute Details
#Id ⇒ Object
Returns the value of attribute Id.
3 4 5 |
# File 'lib/wrapper/resources/work.rb', line 3 def Id @Id end |
#Participations ⇒ Object
Returns the value of attribute Participations.
3 4 5 |
# File 'lib/wrapper/resources/work.rb', line 3 def Participations @Participations end |
#Title ⇒ Object
Returns the value of attribute Title.
3 4 5 |
# File 'lib/wrapper/resources/work.rb', line 3 def Title @Title end |
#Tracks ⇒ Object
Returns the value of attribute Tracks.
3 4 5 |
# File 'lib/wrapper/resources/work.rb', line 3 def Tracks @Tracks end |
Instance Method Details
#participations_initialize ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/wrapper/resources/work.rb', line 12 def participations_initialize array = [] self.Participations.each do |p| array << Decibel::Participation.new(p) end self.Participations = array end |