Class: Runcible::Instance
- Inherits:
-
Object
- Object
- Runcible::Instance
- Defined in:
- lib/runcible/instance.rb
Instance Attribute Summary collapse
-
#extensions ⇒ Object
Returns the value of attribute extensions.
-
#resources ⇒ Object
Returns the value of attribute resources.
Class Method Summary collapse
Instance Method Summary collapse
- #config ⇒ Object
-
#initialize(config = {}) ⇒ Instance
constructor
Initialize a Runcible instance.
-
#update_config(key, value) ⇒ Object
Update an existing config value.
Constructor Details
#initialize(config = {}) ⇒ Instance
Initialize a Runcible instance
52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/runcible/instance.rb', line 52 def initialize(config={}) @config = { :api_path => '/pulp/api/v2/', :url => 'https://localhost', :user => '', :http_auth => {:password => {} }, :headers => {:content_type => 'application/json', :accept => 'application/json'}, :logging => {} }.merge(config).with_indifferent_access initialize_wrappers(config) end |
Instance Attribute Details
#extensions ⇒ Object
Returns the value of attribute extensions.
38 39 40 |
# File 'lib/runcible/instance.rb', line 38 def extensions @extensions end |
#resources ⇒ Object
Returns the value of attribute resources.
37 38 39 |
# File 'lib/runcible/instance.rb', line 37 def resources @resources end |
Class Method Details
.extension_classes ⇒ Object
32 33 34 35 |
# File 'lib/runcible/instance.rb', line 32 def self.extension_classes @@extension_classes ||= gather_classes("extensions") @@extension_classes end |
.resource_classes ⇒ Object
27 28 29 30 |
# File 'lib/runcible/instance.rb', line 27 def self.resource_classes @@resource_classes ||= gather_classes("resources") @@resource_classes end |
Instance Method Details
#config ⇒ Object
74 75 76 |
# File 'lib/runcible/instance.rb', line 74 def config @config end |
#update_config(key, value) ⇒ Object
Update an existing config value
70 71 72 |
# File 'lib/runcible/instance.rb', line 70 def update_config(key, value) @config[key] = value end |