Class: RHC::Rest::Mock::MockRestDeployment

Inherits:
Deployment show all
Defined in:
lib/rhc/rest/mock.rb

Instance Method Summary collapse

Methods inherited from Deployment

#<=>

Methods inherited from Base

#add_message, #has_param?, #link_href, #links, #rest_method, #supports?

Methods included from AttributesClass

#define_attr, #model_name

Methods included from Attributes

#attribute, #attributes, #attributes=, #clear_attribute

Constructor Details

#initialize(client, id, ref, sha1, artifact_url, hot_deploy, created_at, force_clean_build, activations) ⇒ MockRestDeployment

Returns a new instance of MockRestDeployment.



1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
# File 'lib/rhc/rest/mock.rb', line 1091

def initialize(client, id, ref, sha1, artifact_url, hot_deploy, created_at, force_clean_build, activations)
  super({}, client)
  @id = id
  @ref = ref
  @sha1 = sha1
  @artifact_url = artifact_url
  @hot_deploy = hot_deploy
  @created_at = created_at
  @force_clean_build = force_clean_build
  @activations = activations
end

Instance Method Details

#activationsObject



1103
1104
1105
# File 'lib/rhc/rest/mock.rb', line 1103

def activations
  @activations.map{|activation| MockRestActivation.new(client, RHC::Helpers.datetime_rfc3339(activation))}.sort
end