Class: RDStation::Error::Format
- Inherits:
-
Object
- Object
- RDStation::Error::Format
- Defined in:
- lib/rdstation/error/format.rb
Constant Summary collapse
- FLAT_HASH =
'FLAT_HASH'.freeze
- HASH_OF_ARRAYS =
'HASH_OF_ARRAYS'.freeze
- ARRAY_OF_HASHES =
'ARRAY_OF_HASHES'.freeze
Instance Method Summary collapse
- #format ⇒ Object
-
#initialize(errors) ⇒ Format
constructor
A new instance of Format.
Constructor Details
#initialize(errors) ⇒ Format
Returns a new instance of Format.
8 9 10 |
# File 'lib/rdstation/error/format.rb', line 8 def initialize(errors) @errors = errors end |
Instance Method Details
#format ⇒ Object
12 13 14 15 16 |
# File 'lib/rdstation/error/format.rb', line 12 def format return FLAT_HASH if flat_hash? return HASH_OF_ARRAYS if hash_of_arrays? ARRAY_OF_HASHES end |