Class: Enklawa::Api::Episode

Inherits:
Struct
  • Object
show all
Defined in:
lib/enklawa/api/episode.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#descriptionObject

Returns the value of attribute description



6
7
8
# File 'lib/enklawa/api/episode.rb', line 6

def description
  @description
end

#durationObject

Returns the value of attribute duration



6
7
8
# File 'lib/enklawa/api/episode.rb', line 6

def duration
  @duration
end

#idObject

Returns the value of attribute id



6
7
8
# File 'lib/enklawa/api/episode.rb', line 6

def id
  @id
end

#imageObject

Returns the value of attribute image



6
7
8
# File 'lib/enklawa/api/episode.rb', line 6

def image
  @image
end

Returns the value of attribute link



6
7
8
# File 'lib/enklawa/api/episode.rb', line 6

def link
  @link
end

#mp3Object

Returns the value of attribute mp3



6
7
8
# File 'lib/enklawa/api/episode.rb', line 6

def mp3
  @mp3
end

#nameObject

Returns the value of attribute name



6
7
8
# File 'lib/enklawa/api/episode.rb', line 6

def name
  @name
end

#pub_dateObject

Returns the value of attribute pub_date



6
7
8
# File 'lib/enklawa/api/episode.rb', line 6

def pub_date
  @pub_date
end

Instance Method Details

#to_hObject



8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/enklawa/api/episode.rb', line 8

def to_h
  {
    id: id.to_i,
    name: name,
    description: description,
    mp3: mp3,
    pub_date: pub_date.utc.iso8601,
    link: link,
    duration: duration,
    image: image
  }
end