Class: Strada

Inherits:
Object
  • Object
show all
Defined in:
lib/strada/adapter/json.rb,
lib/strada/adapter/toml.rb,
lib/strada/adapter/yaml.rb,
lib/strada/config_struct.rb

Defined Under Namespace

Classes: Adapter, ConfigStruct

Instance Method Summary collapse

Instance Method Details

#from_json(json) ⇒ Object



8
9
10
# File 'lib/strada/adapter/json.rb', line 8

def from_json(json)
  Adapter::JSON.from json
end

#from_toml(toml) ⇒ Object



8
9
10
# File 'lib/strada/adapter/toml.rb', line 8

def from_toml(toml)
  Adapter::TOML.from toml
end

#from_yaml(yaml) ⇒ Object



8
9
10
# File 'lib/strada/adapter/yaml.rb', line 8

def from_yaml(yaml)
  Adapter::YAML.from yaml
end

#to_json(config) ⇒ Object



4
5
6
# File 'lib/strada/adapter/json.rb', line 4

def to_json(config)
  Adapter::JSON.to config._config_to_hash
end

#to_toml(config) ⇒ Object



4
5
6
# File 'lib/strada/adapter/toml.rb', line 4

def to_toml(config)
  Adapter::TOML.to config._config_to_hash
end

#to_yaml(config) ⇒ Object



4
5
6
# File 'lib/strada/adapter/yaml.rb', line 4

def to_yaml(config)
  Adapter::YAML.to config._config_to_hash
end