Exception: CosSinCalc::Triangle::Validator::ValidationError

Inherits:
Exception
  • Object
show all
Defined in:
lib/cossincalc/triangle/validator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(messages, sides_valid = {}, angles_valid = {}) ⇒ ValidationError

Returns a new instance of ValidationError.



15
16
17
# File 'lib/cossincalc/triangle/validator.rb', line 15

def initialize(messages, sides_valid = {}, angles_valid = {})
  @messages, @sides_valid, @angles_valid = messages, sides_valid, angles_valid
end

Instance Attribute Details

#angles_validObject (readonly)

Returns the value of attribute angles_valid.



13
14
15
# File 'lib/cossincalc/triangle/validator.rb', line 13

def angles_valid
  @angles_valid
end

#messagesObject (readonly)

Returns the value of attribute messages.



13
14
15
# File 'lib/cossincalc/triangle/validator.rb', line 13

def messages
  @messages
end

#sides_validObject (readonly)

Returns the value of attribute sides_valid.



13
14
15
# File 'lib/cossincalc/triangle/validator.rb', line 13

def sides_valid
  @sides_valid
end