Class: FlixCloud::File
Direct Known Subclasses
Instance Attribute Summary collapse
-
#cost ⇒ Object
Returns the value of attribute cost.
-
#duration ⇒ Object
Returns the value of attribute duration.
-
#height ⇒ Object
Returns the value of attribute height.
-
#size ⇒ Object
Returns the value of attribute size.
-
#url ⇒ Object
Returns the value of attribute url.
-
#width ⇒ Object
Returns the value of attribute width.
Attributes inherited from Record
Instance Method Summary collapse
Methods inherited from Record
#attributes=, #initialize, record_column
Constructor Details
This class inherits a constructor from FlixCloud::Record
Instance Attribute Details
#cost ⇒ Object
Returns the value of attribute cost.
3 4 5 |
# File 'lib/flix_cloud/file.rb', line 3 def cost @cost end |
#duration ⇒ Object
Returns the value of attribute duration.
3 4 5 |
# File 'lib/flix_cloud/file.rb', line 3 def duration @duration end |
#height ⇒ Object
Returns the value of attribute height.
3 4 5 |
# File 'lib/flix_cloud/file.rb', line 3 def height @height end |
#size ⇒ Object
Returns the value of attribute size.
3 4 5 |
# File 'lib/flix_cloud/file.rb', line 3 def size @size end |
#url ⇒ Object
Returns the value of attribute url.
3 4 5 |
# File 'lib/flix_cloud/file.rb', line 3 def url @url end |
#width ⇒ Object
Returns the value of attribute width.
3 4 5 |
# File 'lib/flix_cloud/file.rb', line 3 def width @width end |
Instance Method Details
#valid? ⇒ Boolean
7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/flix_cloud/file.rb', line 7 def valid? self.errors = [] unless url self.errors << "url is required" end if parameters && !parameters.valid? self.errors << {:parameters => parameters.errors} end errors.empty? end |