Class: Parxer::RowErrors

Inherits:
Hash
  • Object
show all
Defined in:
lib/parxer/collections/row_errors.rb

Instance Method Summary collapse

Instance Method Details

#add_error(attribute_name, error) ⇒ Object



3
4
5
# File 'lib/parxer/collections/row_errors.rb', line 3

def add_error(attribute_name, error)
  self[attribute_name.to_sym] = error
end

#attribute_error(attribute_name) ⇒ Object



11
12
13
# File 'lib/parxer/collections/row_errors.rb', line 11

def attribute_error(attribute_name)
  self[attribute_name.to_sym]
end

#attribute_error?(attribute_name) ⇒ Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/parxer/collections/row_errors.rb', line 7

def attribute_error?(attribute_name)
  !!attribute_error(attribute_name)
end

#errors?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/parxer/collections/row_errors.rb', line 15

def errors?
  any?
end