Class: SlonikMigration::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/slonik_migration/config.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ Config

Returns a new instance of Config.



7
8
9
10
11
# File 'lib/slonik_migration/config.rb', line 7

def initialize(hash)
  hash.each do |key, val|
    send("#{key}=", val) if respond_to?("#{key}=")
  end
end

Instance Attribute Details

#commandObject

Returns the value of attribute command.



5
6
7
# File 'lib/slonik_migration/config.rb', line 5

def command
  @command
end

#enabledObject

Returns the value of attribute enabled.



5
6
7
# File 'lib/slonik_migration/config.rb', line 5

def enabled
  @enabled
end

#ownerObject

Returns the value of attribute owner.



5
6
7
# File 'lib/slonik_migration/config.rb', line 5

def owner
  @owner
end

#variablesObject

Returns the value of attribute variables.



5
6
7
# File 'lib/slonik_migration/config.rb', line 5

def variables
  @variables
end

Class Method Details

.loadObject



14
15
16
17
# File 'lib/slonik_migration/config.rb', line 14

def load
  hash = load_file
  Config.new(hash).freeze
end