Class: Orizuru::App

Inherits:
Object
  • Object
show all
Defined in:
lib/orizuru/app.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#cnameObject (readonly)

Returns the value of attribute cname.



3
4
5
# File 'lib/orizuru/app.rb', line 3

def cname
  @cname
end

#ipObject (readonly)

Returns the value of attribute ip.



3
4
5
# File 'lib/orizuru/app.rb', line 3

def ip
  @ip
end

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/orizuru/app.rb', line 3

def name
  @name
end

#repositoryObject (readonly)

Returns the value of attribute repository.



3
4
5
# File 'lib/orizuru/app.rb', line 3

def repository
  @repository
end

#unitsObject (readonly)

Returns the value of attribute units.



3
4
5
# File 'lib/orizuru/app.rb', line 3

def units
  @units
end

Instance Method Details

#restartObject



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