Class: Pexels::Video::File

Inherits:
Object
  • Object
show all
Defined in:
lib/pexels/video/file.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs) ⇒ File

Returns a new instance of File.



9
10
11
12
13
14
15
16
# File 'lib/pexels/video/file.rb', line 9

def initialize(attrs)
  @id = attrs.fetch('id')
  @quality = attrs.fetch('quality')
  @file_type = attrs.fetch('file_type')
  @width = attrs.fetch('width')
  @height = attrs.fetch('height')
  @link = attrs.fetch('link')
end

Instance Attribute Details

#file_typeObject (readonly)

Returns the value of attribute file_type.



2
3
4
# File 'lib/pexels/video/file.rb', line 2

def file_type
  @file_type
end

#heightObject (readonly)

Returns the value of attribute height.



2
3
4
# File 'lib/pexels/video/file.rb', line 2

def height
  @height
end

#idObject (readonly)

Returns the value of attribute id.



2
3
4
# File 'lib/pexels/video/file.rb', line 2

def id
  @id
end

Returns the value of attribute link.



2
3
4
# File 'lib/pexels/video/file.rb', line 2

def link
  @link
end

#qualityObject (readonly)

Returns the value of attribute quality.



2
3
4
# File 'lib/pexels/video/file.rb', line 2

def quality
  @quality
end

#widthObject (readonly)

Returns the value of attribute width.



2
3
4
# File 'lib/pexels/video/file.rb', line 2

def width
  @width
end