Module: LinkedIn::Configuration::BaseConfiguration
- Included in:
- LinkedIn::Configuration
- Defined in:
- lib/linkedin/configuration.rb
Instance Method Summary collapse
- #config(*keys) ⇒ Object
- #configure(config = {}) {|self.configuration| ... } ⇒ Object
- #load(file_path = 'linkedin.yml') ⇒ Object
Instance Method Details
#config(*keys) ⇒ Object
52 53 54 |
# File 'lib/linkedin/configuration.rb', line 52 def config(*keys) configuration.marshal_dump.slice(*keys) end |
#configure(config = {}) {|self.configuration| ... } ⇒ Object
39 40 41 42 43 44 45 |
# File 'lib/linkedin/configuration.rb', line 39 def configure(config={}, &block) self.configuration.marshal_load self.configuration.marshal_dump.merge(config) yield self.configuration if block_given? self.configuration end |
#load(file_path = 'linkedin.yml') ⇒ Object
47 48 49 50 |
# File 'lib/linkedin/configuration.rb', line 47 def load(file_path = 'linkedin.yml') config = YAML::load(File.open(file_path)).symbolize_keys configure config end |