Exception: FmRest::Spyke::ValidationError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/fmrest/spyke/validation_error.rb,
lib/fmrest/spyke/validation_error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(model) ⇒ ValidationError

Returns a new instance of ValidationError.



17
18
19
20
21
# File 'lib/fmrest/spyke/validation_error.rb', line 17

def initialize(model)
  @model = model
  errors = @model.errors.full_messages.join(", ")
  super("Invalid model: #{errors}")
end

Instance Attribute Details

#modelObject (readonly)

Returns the value of attribute model.



15
16
17
# File 'lib/fmrest/spyke/validation_error.rb', line 15

def model
  @model
end