Class: Miam::DSL::Converter

Inherits:
Object
  • Object
show all
Defined in:
lib/miam/dsl/converter.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(exported, options = {}) ⇒ Converter

Returns a new instance of Converter.



6
7
8
9
# File 'lib/miam/dsl/converter.rb', line 6

def initialize(exported, options = {})
  @exported = exported
  @options = options
end

Class Method Details

.convert(exported, options = {}) ⇒ Object



2
3
4
# File 'lib/miam/dsl/converter.rb', line 2

def self.convert(exported, options = {})
  self.new(exported, options).convert
end

Instance Method Details

#convertObject



11
12
13
14
15
16
17
18
19
# File 'lib/miam/dsl/converter.rb', line 11

def convert
  [
    output_users(@exported[:users]),
    output_groups(@exported[:groups]),
    output_roles(@exported[:roles]),
    output_instance_profiles(@exported[:instance_profiles]),
    output_managed_policies(@exported[:policies]),
  ].join("\n")
end