Class: Decibel::Work

Inherits:
Object
  • Object
show all
Defined in:
lib/wrapper/resources/work.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#IdObject

Returns the value of attribute Id.



3
4
5
# File 'lib/wrapper/resources/work.rb', line 3

def Id
  @Id
end

#ParticipationsObject

Returns the value of attribute Participations.



3
4
5
# File 'lib/wrapper/resources/work.rb', line 3

def Participations
  @Participations
end

#TitleObject

Returns the value of attribute Title.



3
4
5
# File 'lib/wrapper/resources/work.rb', line 3

def Title
  @Title
end

#TracksObject

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_initializeObject



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