Class: Pexels::Video::File
- Inherits:
-
Object
- Object
- Pexels::Video::File
- Defined in:
- lib/pexels/video/file.rb
Instance Attribute Summary collapse
-
#file_type ⇒ Object
readonly
Returns the value of attribute file_type.
-
#height ⇒ Object
readonly
Returns the value of attribute height.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#link ⇒ Object
readonly
Returns the value of attribute link.
-
#quality ⇒ Object
readonly
Returns the value of attribute quality.
-
#width ⇒ Object
readonly
Returns the value of attribute width.
Instance Method Summary collapse
-
#initialize(attrs) ⇒ File
constructor
A new instance of File.
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_type ⇒ Object (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 |
#height ⇒ Object (readonly)
Returns the value of attribute height.
2 3 4 |
# File 'lib/pexels/video/file.rb', line 2 def height @height end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
2 3 4 |
# File 'lib/pexels/video/file.rb', line 2 def id @id end |
#link ⇒ Object (readonly)
Returns the value of attribute link.
2 3 4 |
# File 'lib/pexels/video/file.rb', line 2 def link @link end |
#quality ⇒ Object (readonly)
Returns the value of attribute quality.
2 3 4 |
# File 'lib/pexels/video/file.rb', line 2 def quality @quality end |
#width ⇒ Object (readonly)
Returns the value of attribute width.
2 3 4 |
# File 'lib/pexels/video/file.rb', line 2 def width @width end |