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
162 163 164 |
# File 'lib/hatch.rb', line 162 def self.build(validated_attributes) self[attributes_and_errors(validated_attributes)] end |
Instance Method Details
#empty? ⇒ Boolean
174 175 176 |
# File 'lib/hatch.rb', line 174 def empty? .empty? end |
#full_messages ⇒ Object
170 171 172 |
# File 'lib/hatch.rb', line 170 def values.reject {|value| value.empty?} end |
#on(attr) ⇒ Object
166 167 168 |
# File 'lib/hatch.rb', line 166 def on(attr) self[attr] end |