Class: FlixCloud::Parameters
- Defined in:
- lib/flix_cloud/parameters.rb
Instance Attribute Summary collapse
-
#password ⇒ Object
Returns the value of attribute password.
-
#user ⇒ Object
Returns the value of attribute user.
Attributes inherited from File
#cost, #duration, #height, #size, #url, #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
#password ⇒ Object
Returns the value of attribute password.
3 4 5 |
# File 'lib/flix_cloud/parameters.rb', line 3 def password @password end |
#user ⇒ Object
Returns the value of attribute user.
3 4 5 |
# File 'lib/flix_cloud/parameters.rb', line 3 def user @user end |
Instance Method Details
#valid? ⇒ Boolean
5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/flix_cloud/parameters.rb', line 5 def valid? self.errors = [] unless user self.errors << "user is required" end unless password self.errors << "password is required" end errors.empty? end |