Class: Brainzz::Video

Inherits:
BaseModel show all
Defined in:
lib/brainzz/models/video.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#durationObject

Returns the value of attribute duration.



3
4
5
# File 'lib/brainzz/models/video.rb', line 3

def duration
  @duration
end

#idObject

Returns the value of attribute id.



3
4
5
# File 'lib/brainzz/models/video.rb', line 3

def id
  @id
end

#published_atObject

Returns the value of attribute published_at.



3
4
5
# File 'lib/brainzz/models/video.rb', line 3

def published_at
  @published_at
end

#titleObject

Returns the value of attribute title.



3
4
5
# File 'lib/brainzz/models/video.rb', line 3

def title
  @title
end