Class: EncodingDotCom::MediaListItem

Inherits:
Object
  • Object
show all
Defined in:
lib/encoding_dot_com/media_list_item.rb

Overview

Represents a video or image in the encoding.com queue

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(node) ⇒ MediaListItem

Creates a MediaListItem, given a <media> Nokogiri::XML::Node

See the encoding.com documentation for GetMediaList for more details



12
13
14
15
16
17
18
19
# File 'lib/encoding_dot_com/media_list_item.rb', line 12

def initialize(node)
  @media_file = (node / "mediafile").text
  @media_id = (node / "mediaid").text.to_i
  @media_status = (node / "mediastatus").text
  @create_date = parse_time_node(node / "createdate")
  @start_date = parse_time_node(node / "startdate")
  @finish_date = parse_time_node(node / "finishdate")
end

Instance Attribute Details

#create_dateObject (readonly)

Returns the value of attribute create_date.



7
8
9
# File 'lib/encoding_dot_com/media_list_item.rb', line 7

def create_date
  @create_date
end

#finish_dateObject (readonly)

Returns the value of attribute finish_date.



7
8
9
# File 'lib/encoding_dot_com/media_list_item.rb', line 7

def finish_date
  @finish_date
end

#media_fileObject (readonly)

Returns the value of attribute media_file.



7
8
9
# File 'lib/encoding_dot_com/media_list_item.rb', line 7

def media_file
  @media_file
end

#media_idObject (readonly)

Returns the value of attribute media_id.



7
8
9
# File 'lib/encoding_dot_com/media_list_item.rb', line 7

def media_id
  @media_id
end

#media_statusObject (readonly)

Returns the value of attribute media_status.



7
8
9
# File 'lib/encoding_dot_com/media_list_item.rb', line 7

def media_status
  @media_status
end

#start_dateObject (readonly)

Returns the value of attribute start_date.



7
8
9
# File 'lib/encoding_dot_com/media_list_item.rb', line 7

def start_date
  @start_date
end