Class: ErrorBuilder::Formats::Base
- Inherits:
-
Object
- Object
- ErrorBuilder::Formats::Base
- Defined in:
- lib/error_builder/formats/base.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#flat ⇒ Object
readonly
Returns the value of attribute flat.
Instance Method Summary collapse
-
#initialize(errors, flat: false) ⇒ Base
constructor
A new instance of Base.
- #to_h ⇒ Object
Constructor Details
#initialize(errors, flat: false) ⇒ Base
Returns a new instance of Base.
8 9 10 11 |
# File 'lib/error_builder/formats/base.rb', line 8 def initialize(errors, flat: false) @errors = errors @flat = flat end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
6 7 8 |
# File 'lib/error_builder/formats/base.rb', line 6 def errors @errors end |
#flat ⇒ Object (readonly)
Returns the value of attribute flat.
6 7 8 |
# File 'lib/error_builder/formats/base.rb', line 6 def flat @flat end |
Instance Method Details
#to_h ⇒ Object
13 14 15 |
# File 'lib/error_builder/formats/base.rb', line 13 def to_h raise NotImplementedError, "#{self.class} has not implemented method '#{__method__}'" end |