Class: Brainzz::Video
- Defined in:
- lib/brainzz/models/video.rb
Instance Attribute Summary collapse
-
#duration ⇒ Object
Returns the value of attribute duration.
-
#id ⇒ Object
Returns the value of attribute id.
-
#published_at ⇒ Object
Returns the value of attribute published_at.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(hash = {}) ⇒ Video
constructor
A new instance of Video.
Constructor Details
#initialize(hash = {}) ⇒ Video
Returns a new instance of Video.
5 6 7 8 9 10 11 12 |
# File 'lib/brainzz/models/video.rb', line 5 def initialize(hash = {}) @hash = hash || {} @id = transform(hash_id) @title = transform(hash_title) @published_at = transform_date(hash_published_at) @duration = transform_duration(hash_duration) end |
Instance Attribute Details
#duration ⇒ Object
Returns the value of attribute duration.
3 4 5 |
# File 'lib/brainzz/models/video.rb', line 3 def duration @duration end |
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/brainzz/models/video.rb', line 3 def id @id end |
#published_at ⇒ Object
Returns the value of attribute published_at.
3 4 5 |
# File 'lib/brainzz/models/video.rb', line 3 def published_at @published_at end |
#title ⇒ Object
Returns the value of attribute title.
3 4 5 |
# File 'lib/brainzz/models/video.rb', line 3 def title @title end |