Class: Release

Inherits:
Object
  • Object
show all
Defined in:
lib/cluster/release.rb

Direct Known Subclasses

AmazonRelease

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Release

Returns a new instance of Release.



7
8
9
10
11
12
13
14
15
# File 'lib/cluster/release.rb', line 7

def initialize(*args)
  options = args.extract_options!
  options.each do |key, value|
    func = "#{key}="
    if self.respond_to? func
      self.send func, value
    end
  end
end

Instance Attribute Details

#created_atObject

Returns the value of attribute created_at.



2
3
4
# File 'lib/cluster/release.rb', line 2

def created_at
  @created_at
end

#environmentObject

Returns the value of attribute environment.



2
3
4
# File 'lib/cluster/release.rb', line 2

def environment
  @environment
end

#labelObject

Returns the value of attribute label.



2
3
4
# File 'lib/cluster/release.rb', line 2

def label
  @label
end

#tagObject

Returns the value of attribute tag.



2
3
4
# File 'lib/cluster/release.rb', line 2

def tag
  @tag
end

Class Method Details

.current(environment = 'staging') ⇒ Object



22
23
24
# File 'lib/cluster/release.rb', line 22

def current(environment = 'staging')
  Infrastructure.current.release_class.current(environment)
end

.find(env, tag) ⇒ Object



26
27
28
# File 'lib/cluster/release.rb', line 26

def find(env, tag)
  Infrastructure.current.release_class.find(environment, tag)
end