Class: Lara::Models::Audio

Inherits:
Base
  • Object
show all
Defined in:
lib/lara/models/audio.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

parse_time

Constructor Details

#initialize(id:, status:, filename:, target: nil, source: nil, created_at: nil, updated_at: nil, options: nil, translated_seconds: nil, total_seconds: nil, error_reason: nil) ⇒ Audio

Returns a new instance of Audio.



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# File 'lib/lara/models/audio.rb', line 39

def initialize(id:, status:, filename:, target: nil, source: nil, created_at: nil, updated_at: nil,
               options: nil, translated_seconds: nil, total_seconds: nil, error_reason: nil)
  super()
  @id = id
  @status = status
  @source = source
  @target = target
  @filename = filename
  @created_at = Base.parse_time(created_at)
  @updated_at = Base.parse_time(updated_at)
  @options = options
  @translated_seconds = translated_seconds&.to_f
  @total_seconds = total_seconds&.to_f
  @error_reason = error_reason
end

Instance Attribute Details

#created_atObject (readonly)

Returns the value of attribute created_at.



36
37
38
# File 'lib/lara/models/audio.rb', line 36

def created_at
  @created_at
end

#error_reasonObject (readonly)

Returns the value of attribute error_reason.



36
37
38
# File 'lib/lara/models/audio.rb', line 36

def error_reason
  @error_reason
end

#filenameObject (readonly)

Returns the value of attribute filename.



36
37
38
# File 'lib/lara/models/audio.rb', line 36

def filename
  @filename
end

#idObject (readonly)

Returns the value of attribute id.



36
37
38
# File 'lib/lara/models/audio.rb', line 36

def id
  @id
end

#optionsObject (readonly)

Returns the value of attribute options.



36
37
38
# File 'lib/lara/models/audio.rb', line 36

def options
  @options
end

#sourceObject (readonly)

Returns the value of attribute source.



36
37
38
# File 'lib/lara/models/audio.rb', line 36

def source
  @source
end

#statusObject (readonly)

Returns the value of attribute status.



36
37
38
# File 'lib/lara/models/audio.rb', line 36

def status
  @status
end

#targetObject (readonly)

Returns the value of attribute target.



36
37
38
# File 'lib/lara/models/audio.rb', line 36

def target
  @target
end

#total_secondsObject (readonly)

Returns the value of attribute total_seconds.



36
37
38
# File 'lib/lara/models/audio.rb', line 36

def total_seconds
  @total_seconds
end

#translated_secondsObject (readonly)

Returns the value of attribute translated_seconds.



36
37
38
# File 'lib/lara/models/audio.rb', line 36

def translated_seconds
  @translated_seconds
end

#updated_atObject (readonly)

Returns the value of attribute updated_at.



36
37
38
# File 'lib/lara/models/audio.rb', line 36

def updated_at
  @updated_at
end