Class: RHC::Rest::Deployment

Inherits:
Base show all
Defined in:
lib/rhc/rest/deployment.rb

Direct Known Subclasses

Mock::MockRestDeployment

Instance Method Summary collapse

Methods inherited from Base

#add_message, #has_param?, #initialize, #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

This class inherits a constructor from RHC::Rest::Base

Instance Method Details

#<=>(other) ⇒ Object



13
14
15
# File 'lib/rhc/rest/deployment.rb', line 13

def <=>(other)
 other.created_at <=> created_at
end

#activationsObject



8
9
10
11
# File 'lib/rhc/rest/deployment.rb', line 8

def activations
  @activations ||=
    attributes['activations'].map{|activation| Activation.new({:created_at => RHC::Helpers.datetime_rfc3339(activation)}, client)}.sort
end