Class: Conjure::Instance
- Inherits:
-
Object
- Object
- Conjure::Instance
- Defined in:
- lib/conjure/instance.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(ip_address, options) ⇒ Instance
constructor
A new instance of Instance.
- #ip_address ⇒ Object
- #pending_files ⇒ Object
- #port ⇒ Object
- #update ⇒ Object
- #user ⇒ Object
Constructor Details
#initialize(ip_address, options) ⇒ Instance
Returns a new instance of Instance.
9 10 11 12 |
# File 'lib/conjure/instance.rb', line 9 def initialize(ip_address, ) @server = Server.new ip_address = end |
Class Method Details
.create(options) ⇒ Object
14 15 16 17 |
# File 'lib/conjure/instance.rb', line 14 def self.create() @server = Server.create server_name_prefix(), new(@server.ip_address, ).tap(&:update) end |
.update(options) ⇒ Object
19 20 21 22 |
# File 'lib/conjure/instance.rb', line 19 def self.update() ip_address = .delete(:ip_address) new(ip_address, ).tap(&:update) end |
Instance Method Details
#ip_address ⇒ Object
28 29 30 |
# File 'lib/conjure/instance.rb', line 28 def ip_address @server.ip_address end |
#pending_files ⇒ Object
40 41 42 |
# File 'lib/conjure/instance.rb', line 40 def pending_files components.flat_map(&:pending_files) end |
#port ⇒ Object
32 33 34 |
# File 'lib/conjure/instance.rb', line 32 def port 2222 end |
#update ⇒ Object
24 25 26 |
# File 'lib/conjure/instance.rb', line 24 def update components.each(&:install) end |
#user ⇒ Object
36 37 38 |
# File 'lib/conjure/instance.rb', line 36 def user "app" end |