Class: Hatch::Errors
- Inherits:
-
Hash
- Object
- Hash
- Hatch::Errors
- Defined in:
- lib/hatch.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.build(validated_attributes) ⇒ Object
138 139 140 |
# File 'lib/hatch.rb', line 138 def self.build(validated_attributes) self[attributes_and_errors(validated_attributes)] end |
Instance Method Details
#empty? ⇒ Boolean
150 151 152 |
# File 'lib/hatch.rb', line 150 def empty? .empty? end |
#full_messages ⇒ Object
146 147 148 |
# File 'lib/hatch.rb', line 146 def values.reject {|value| value.empty?} end |
#on(attr) ⇒ Object
142 143 144 |
# File 'lib/hatch.rb', line 142 def on(attr) self[attr] end |