Class: Gratan::DSL::Converter
- Inherits:
-
Object
- Object
- Gratan::DSL::Converter
- Defined in:
- lib/gratan/dsl/converter.rb
Class Method Summary collapse
Instance Method Summary collapse
- #convert ⇒ Object
-
#initialize(exported, options = {}) ⇒ Converter
constructor
A new instance of Converter.
Constructor Details
#initialize(exported, options = {}) ⇒ Converter
Returns a new instance of Converter.
6 7 8 9 |
# File 'lib/gratan/dsl/converter.rb', line 6 def initialize(exported, = {}) @exported = exported = end |
Class Method Details
.convert(exported, options = {}) ⇒ Object
2 3 4 |
# File 'lib/gratan/dsl/converter.rb', line 2 def self.convert(exported, = {}) self.new(exported, ).convert end |
Instance Method Details
#convert ⇒ Object
11 12 13 14 15 |
# File 'lib/gratan/dsl/converter.rb', line 11 def convert @exported.map {|user_host, attrs| output_user(user_host, attrs) }.join("\n") end |