Class: PRX::Model::Piece
- Includes:
- Representer::Full::PieceRepresenter, Roar::Representer::JSON
- Defined in:
- lib/prx/model/piece.rb
Instance Attribute Summary collapse
-
#account ⇒ Object
Returns the value of attribute account.
-
#account_id ⇒ Object
Returns the value of attribute account_id.
-
#allow_comments ⇒ Object
Returns the value of attribute allow_comments.
-
#audio_versions ⇒ Object
Returns the value of attribute audio_versions.
-
#broadcast_history ⇒ Object
Returns the value of attribute broadcast_history.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#creator ⇒ Object
Returns the value of attribute creator.
-
#credits ⇒ Object
Returns the value of attribute credits.
-
#description ⇒ Object
Returns the value of attribute description.
-
#episode_date ⇒ Object
Returns the value of attribute episode_date.
-
#episode_identifier ⇒ Object
Returns the value of attribute episode_identifier.
-
#episode_number ⇒ Object
Returns the value of attribute episode_number.
-
#intro ⇒ Object
Returns the value of attribute intro.
-
#is_shareable ⇒ Object
Returns the value of attribute is_shareable.
-
#language ⇒ Object
Returns the value of attribute language.
-
#length ⇒ Object
Returns the value of attribute length.
-
#license ⇒ Object
Returns the value of attribute license.
-
#network_only ⇒ Object
Returns the value of attribute network_only.
-
#networks ⇒ Object
Returns the value of attribute networks.
-
#outro ⇒ Object
Returns the value of attribute outro.
-
#point_level ⇒ Object
Returns the value of attribute point_level.
-
#produced_on ⇒ Object
Returns the value of attribute produced_on.
-
#producers ⇒ Object
Returns the value of attribute producers.
-
#promos ⇒ Object
Returns the value of attribute promos.
-
#publish_on_valid ⇒ Object
Returns the value of attribute publish_on_valid.
-
#published_at ⇒ Object
Returns the value of attribute published_at.
-
#related_website ⇒ Object
Returns the value of attribute related_website.
-
#series ⇒ Object
Returns the value of attribute series.
-
#short_description ⇒ Object
Returns the value of attribute short_description.
-
#title ⇒ Object
Returns the value of attribute title.
Attributes inherited from Base
Instance Method Summary collapse
- #add_audio(audio = {}) ⇒ Object
-
#initialize(*args) ⇒ Piece
constructor
A new instance of Piece.
Methods inherited from Base
#class_path_part, #find_by_id, request, #request, #save
Constructor Details
#initialize(*args) ⇒ Piece
Returns a new instance of Piece.
19 20 21 22 23 |
# File 'lib/prx/model/piece.rb', line 19 def initialize(*args) super self.audio_versions ||= [] self.networks ||= [] end |
Instance Attribute Details
#account ⇒ Object
Returns the value of attribute account.
16 17 18 |
# File 'lib/prx/model/piece.rb', line 16 def account @account end |
#account_id ⇒ Object
Returns the value of attribute account_id.
12 13 14 |
# File 'lib/prx/model/piece.rb', line 12 def account_id @account_id end |
#allow_comments ⇒ Object
Returns the value of attribute allow_comments.
15 16 17 |
# File 'lib/prx/model/piece.rb', line 15 def allow_comments @allow_comments end |
#audio_versions ⇒ Object
Returns the value of attribute audio_versions.
16 17 18 |
# File 'lib/prx/model/piece.rb', line 16 def audio_versions @audio_versions end |
#broadcast_history ⇒ Object
Returns the value of attribute broadcast_history.
14 15 16 |
# File 'lib/prx/model/piece.rb', line 14 def broadcast_history @broadcast_history end |
#created_at ⇒ Object
Returns the value of attribute created_at.
12 13 14 |
# File 'lib/prx/model/piece.rb', line 12 def created_at @created_at end |
#creator ⇒ Object
Returns the value of attribute creator.
16 17 18 |
# File 'lib/prx/model/piece.rb', line 16 def creator @creator end |
#credits ⇒ Object
Returns the value of attribute credits.
14 15 16 |
# File 'lib/prx/model/piece.rb', line 14 def credits @credits end |
#description ⇒ Object
Returns the value of attribute description.
12 13 14 |
# File 'lib/prx/model/piece.rb', line 12 def description @description end |
#episode_date ⇒ Object
Returns the value of attribute episode_date.
13 14 15 |
# File 'lib/prx/model/piece.rb', line 13 def episode_date @episode_date end |
#episode_identifier ⇒ Object
Returns the value of attribute episode_identifier.
13 14 15 |
# File 'lib/prx/model/piece.rb', line 13 def episode_identifier @episode_identifier end |
#episode_number ⇒ Object
Returns the value of attribute episode_number.
13 14 15 |
# File 'lib/prx/model/piece.rb', line 13 def episode_number @episode_number end |
#intro ⇒ Object
Returns the value of attribute intro.
14 15 16 |
# File 'lib/prx/model/piece.rb', line 14 def intro @intro end |
#is_shareable ⇒ Object
Returns the value of attribute is_shareable.
15 16 17 |
# File 'lib/prx/model/piece.rb', line 15 def is_shareable @is_shareable end |
#language ⇒ Object
Returns the value of attribute language.
14 15 16 |
# File 'lib/prx/model/piece.rb', line 14 def language @language end |
#length ⇒ Object
Returns the value of attribute length.
14 15 16 |
# File 'lib/prx/model/piece.rb', line 14 def length @length end |
#license ⇒ Object
Returns the value of attribute license.
16 17 18 |
# File 'lib/prx/model/piece.rb', line 16 def license @license end |
#network_only ⇒ Object
Returns the value of attribute network_only.
15 16 17 |
# File 'lib/prx/model/piece.rb', line 15 def network_only @network_only end |
#networks ⇒ Object
Returns the value of attribute networks.
16 17 18 |
# File 'lib/prx/model/piece.rb', line 16 def networks @networks end |
#outro ⇒ Object
Returns the value of attribute outro.
14 15 16 |
# File 'lib/prx/model/piece.rb', line 14 def outro @outro end |
#point_level ⇒ Object
Returns the value of attribute point_level.
15 16 17 |
# File 'lib/prx/model/piece.rb', line 15 def point_level @point_level end |
#produced_on ⇒ Object
Returns the value of attribute produced_on.
12 13 14 |
# File 'lib/prx/model/piece.rb', line 12 def produced_on @produced_on end |
#producers ⇒ Object
Returns the value of attribute producers.
16 17 18 |
# File 'lib/prx/model/piece.rb', line 16 def producers @producers end |
#promos ⇒ Object
Returns the value of attribute promos.
16 17 18 |
# File 'lib/prx/model/piece.rb', line 16 def promos @promos end |
#publish_on_valid ⇒ Object
Returns the value of attribute publish_on_valid.
17 18 19 |
# File 'lib/prx/model/piece.rb', line 17 def publish_on_valid @publish_on_valid end |
#published_at ⇒ Object
Returns the value of attribute published_at.
12 13 14 |
# File 'lib/prx/model/piece.rb', line 12 def published_at @published_at end |
#related_website ⇒ Object
Returns the value of attribute related_website.
14 15 16 |
# File 'lib/prx/model/piece.rb', line 14 def @related_website end |
#series ⇒ Object
Returns the value of attribute series.
16 17 18 |
# File 'lib/prx/model/piece.rb', line 16 def series @series end |
#short_description ⇒ Object
Returns the value of attribute short_description.
12 13 14 |
# File 'lib/prx/model/piece.rb', line 12 def short_description @short_description end |
#title ⇒ Object
Returns the value of attribute title.
12 13 14 |
# File 'lib/prx/model/piece.rb', line 12 def title @title end |
Instance Method Details
#add_audio(audio = {}) ⇒ Object
25 26 27 28 29 30 |
# File 'lib/prx/model/piece.rb', line 25 def add_audio(audio={}) if self.audio_versions.size < 1 self.audio_versions << AudioVersion.new(:label=>'Piece Audio') end self.audio_versions[0].audio_files << AudioFile.new(audio) end |