Class: RailsDb::Result
- Inherits:
-
Object
- Object
- RailsDb::Result
- Defined in:
- lib/rails_db/result.rb
Instance Attribute Summary collapse
-
#error ⇒ Object
readonly
Returns the value of attribute error.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(error) ⇒ Result
constructor
A new instance of Result.
- #ok? ⇒ Boolean
Constructor Details
#initialize(error) ⇒ Result
Returns a new instance of Result.
6 7 8 |
# File 'lib/rails_db/result.rb', line 6 def initialize(error) @error = error end |
Instance Attribute Details
#error ⇒ Object (readonly)
Returns the value of attribute error.
4 5 6 |
# File 'lib/rails_db/result.rb', line 4 def error @error end |
Class Method Details
Instance Method Details
#ok? ⇒ Boolean
14 15 16 |
# File 'lib/rails_db/result.rb', line 14 def ok? error.nil? end |