Class: Aspera::Cli::Flattener
- Inherits:
-
Object
- Object
- Aspera::Cli::Flattener
- Defined in:
- lib/aspera/cli/formatter.rb
Overview
This class is used to transform a complex structure into a simple hash
Instance Method Summary collapse
-
#flatten(something) ⇒ Object
General method.
-
#initialize(formatter) ⇒ Flattener
constructor
A new instance of Flattener.
Constructor Details
#initialize(formatter) ⇒ Flattener
Returns a new instance of Flattener.
19 20 21 22 |
# File 'lib/aspera/cli/formatter.rb', line 19 def initialize(formatter) @result = nil @formatter = formatter end |
Instance Method Details
#flatten(something) ⇒ Object
General method
25 26 27 28 29 30 |
# File 'lib/aspera/cli/formatter.rb', line 25 def flatten(something) Aspera.assert_type(something, Hash) @result = {} flatten_any(something, '') return @result end |