Class: RemoteFactoryGirl::ConfigApplier

Inherits:
Object
  • Object
show all
Defined in:
lib/remote_factory_girl/config_applier.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json, config = {}) ⇒ ConfigApplier

Returns a new instance of ConfigApplier.



14
15
16
17
# File 'lib/remote_factory_girl/config_applier.rb', line 14

def initialize(json, config = {})
  @json   = json
  @config = default_config.merge(config)
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



8
9
10
# File 'lib/remote_factory_girl/config_applier.rb', line 8

def config
  @config
end

#jsonObject (readonly)

Returns the value of attribute json.



8
9
10
# File 'lib/remote_factory_girl/config_applier.rb', line 8

def json
  @json
end

Class Method Details

.apply_config(json, config = {}) ⇒ Object



10
11
12
# File 'lib/remote_factory_girl/config_applier.rb', line 10

def self.apply_config(json, config = {})
  new(json, config).apply_config
end

Instance Method Details

#apply_configObject



19
20
21
# File 'lib/remote_factory_girl/config_applier.rb', line 19

def apply_config
  apply_config_options
end