Class: Pods::Instance
- Inherits:
-
Object
- Object
- Pods::Instance
- Extended by:
- Forwardable
- Defined in:
- lib/podbay/instance.rb
Instance Attribute Summary collapse
-
#adapter ⇒ Object
readonly
Returns the value of attribute adapter.
Instance Method Summary collapse
- #build_pod(pod_file) ⇒ Object
-
#configuration ⇒ Object
def_delegator :@adapter, :config, :configure.
- #configure(config = {}) ⇒ Object
- #delete_pod(pod_file) ⇒ Object
-
#initialize(adapter) ⇒ Instance
constructor
A new instance of Instance.
Constructor Details
#initialize(adapter) ⇒ Instance
Returns a new instance of Instance.
16 17 18 |
# File 'lib/podbay/instance.rb', line 16 def initialize(adapter) @adapter = adapter.dup end |
Instance Attribute Details
#adapter ⇒ Object (readonly)
Returns the value of attribute adapter.
14 15 16 |
# File 'lib/podbay/instance.rb', line 14 def adapter @adapter end |
Instance Method Details
#build_pod(pod_file) ⇒ Object
31 32 33 |
# File 'lib/podbay/instance.rb', line 31 def build_pod(pod_file) adapter.build_pod(pod_file) end |
#configuration ⇒ Object
def_delegator :@adapter, :config, :configure
22 23 24 |
# File 'lib/podbay/instance.rb', line 22 def configuration @_config ||= adapter.load_config end |
#configure(config = {}) ⇒ Object
26 27 28 29 |
# File 'lib/podbay/instance.rb', line 26 def configure(config={}) adapter.set_config(config) @_config = nil end |
#delete_pod(pod_file) ⇒ Object
35 36 37 |
# File 'lib/podbay/instance.rb', line 35 def delete_pod(pod_file) adapter.delete_pod(pod_file) end |