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
Class Method Details
.create(options) ⇒ Object
15 16 17 18 |
# File 'lib/conjure/instance.rb', line 15 def self.create() @server = Server.create server_name_prefix(), new(@server.ip_address, ).tap(&:update) end |
.update(options) ⇒ Object
20 21 22 23 |
# File 'lib/conjure/instance.rb', line 20 def self.update() ip_address = .delete(:ip_address) new(ip_address, ).tap(&:update) end |
Instance Method Details
#ip_address ⇒ Object
29 30 31 |
# File 'lib/conjure/instance.rb', line 29 def ip_address @server.ip_address end |
#pending_files ⇒ Object
41 42 43 |
# File 'lib/conjure/instance.rb', line 41 def pending_files components.flat_map(&:pending_files) end |
#port ⇒ Object
33 34 35 |
# File 'lib/conjure/instance.rb', line 33 def port 2222 end |
#update ⇒ Object
25 26 27 |
# File 'lib/conjure/instance.rb', line 25 def update components.each(&:install) end |
#user ⇒ Object
37 38 39 |
# File 'lib/conjure/instance.rb', line 37 def user "app" end |