Exception: Iron::Content::InvalidContent

Inherits:
Error
  • Object
show all
Defined in:
app/models/iron/content.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(errors) ⇒ InvalidContent

Returns a new instance of InvalidContent.



10
11
12
13
# File 'app/models/iron/content.rb', line 10

def initialize(errors)
  @errors = errors
  super(errors.map { |path, messages| "#{path} #{Array(messages).join(", ")}" }.join("; "))
end

Instance Attribute Details

#errorsObject (readonly)

Returns the value of attribute errors.



8
9
10
# File 'app/models/iron/content.rb', line 8

def errors
  @errors
end