Class: CarthageCache::ValidationResult
- Inherits:
-
Object
- Object
- CarthageCache::ValidationResult
- Defined in:
- lib/carthage_cache/configuration_validator.rb
Instance Attribute Summary collapse
-
#error ⇒ Object
readonly
Returns the value of attribute error.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(error) ⇒ ValidationResult
constructor
A new instance of ValidationResult.
- #valid? ⇒ Boolean
Constructor Details
#initialize(error) ⇒ ValidationResult
Returns a new instance of ValidationResult.
50 51 52 |
# File 'lib/carthage_cache/configuration_validator.rb', line 50 def initialize(error) @error = error end |
Instance Attribute Details
#error ⇒ Object (readonly)
Returns the value of attribute error.
48 49 50 |
# File 'lib/carthage_cache/configuration_validator.rb', line 48 def error @error end |
Class Method Details
.invalid(error) ⇒ Object
44 45 46 |
# File 'lib/carthage_cache/configuration_validator.rb', line 44 def self.invalid(error) self.new(error) end |
.valid ⇒ Object
40 41 42 |
# File 'lib/carthage_cache/configuration_validator.rb', line 40 def self.valid self.new(nil) end |
Instance Method Details
#valid? ⇒ Boolean
54 55 56 |
# File 'lib/carthage_cache/configuration_validator.rb', line 54 def valid? @error == nil end |