Class: CarthageCache::ValidationResult

Inherits:
Object
  • Object
show all
Defined in:
lib/carthage_cache/configuration_validator.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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

#errorObject (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

.validObject



40
41
42
# File 'lib/carthage_cache/configuration_validator.rb', line 40

def self.valid
  self.new(nil)
end

Instance Method Details

#valid?Boolean

Returns:

  • (Boolean)


54
55
56
# File 'lib/carthage_cache/configuration_validator.rb', line 54

def valid?
  @error == nil
end