Exception: Sinatra::Kagero::Props::ValidationError

Inherits:
ArgumentError
  • Object
show all
Defined in:
lib/sinatra/kagero/props.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(errors) ⇒ ValidationError

Returns a new instance of ValidationError.



11
12
13
14
# File 'lib/sinatra/kagero/props.rb', line 11

def initialize(errors)
  @errors = errors
  super(errors.map { |name, message| "#{name}: #{message}" }.join(", "))
end

Instance Attribute Details

#errorsObject (readonly)

Returns the value of attribute errors.



9
10
11
# File 'lib/sinatra/kagero/props.rb', line 9

def errors
  @errors
end