Class: Orizuru::App
- Inherits:
-
Object
- Object
- Orizuru::App
- Defined in:
- lib/orizuru/app.rb
Instance Attribute Summary collapse
-
#cname ⇒ Object
readonly
Returns the value of attribute cname.
-
#ip ⇒ Object
readonly
Returns the value of attribute ip.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#repository ⇒ Object
readonly
Returns the value of attribute repository.
-
#units ⇒ Object
readonly
Returns the value of attribute units.
Instance Method Summary collapse
-
#initialize(connection, name, ip, cname, repository, units) ⇒ App
constructor
A new instance of App.
- #restart ⇒ Object
Constructor Details
#initialize(connection, name, ip, cname, repository, units) ⇒ App
Returns a new instance of App.
5 6 7 8 |
# File 'lib/orizuru/app.rb', line 5 def initialize(connection, name, ip, cname, repository, units) @connection = connection @name, @ip, @cname, @repository, @units = name, ip, cname, repository, units end |
Instance Attribute Details
#cname ⇒ Object (readonly)
Returns the value of attribute cname.
3 4 5 |
# File 'lib/orizuru/app.rb', line 3 def cname @cname end |
#ip ⇒ Object (readonly)
Returns the value of attribute ip.
3 4 5 |
# File 'lib/orizuru/app.rb', line 3 def ip @ip end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/orizuru/app.rb', line 3 def name @name end |
#repository ⇒ Object (readonly)
Returns the value of attribute repository.
3 4 5 |
# File 'lib/orizuru/app.rb', line 3 def repository @repository end |
#units ⇒ Object (readonly)
Returns the value of attribute units.
3 4 5 |
# File 'lib/orizuru/app.rb', line 3 def units @units end |
Instance Method Details
#restart ⇒ Object
10 11 12 13 14 |
# File 'lib/orizuru/app.rb', line 10 def restart units.each do |unit| @connection.post '/apps/%s/restart' % @name end end |