Class: CldProvisioning::Models::Shared::Cycles

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Includes:
Crystalline::MetadataFields
Defined in:
lib/cld_provisioning/models/shared/cycles.rb

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

#field, #fields, included, #marshal_single, #to_dict, #to_json

Constructor Details

#initialize(from_day: nil, to_day: nil, usage: nil, breakdown: nil, product_environment_breakdown: nil) ⇒ Cycles

Returns a new instance of Cycles.



66
67
68
69
70
71
72
# File 'lib/cld_provisioning/models/shared/cycles.rb', line 66

def initialize(from_day: nil, to_day: nil, usage: nil, breakdown: nil, product_environment_breakdown: nil)
  @from_day = from_day
  @to_day = to_day
  @usage = usage
  @breakdown = breakdown
  @product_environment_breakdown = product_environment_breakdown
end

Instance Method Details

#==(other) ⇒ Object



75
76
77
78
79
80
81
82
83
# File 'lib/cld_provisioning/models/shared/cycles.rb', line 75

def ==(other)
  return false unless other.is_a?(self.class)
  return false unless @from_day == other.from_day
  return false unless @to_day == other.to_day
  return false unless @usage == other.usage
  return false unless @breakdown == other.breakdown
  return false unless @product_environment_breakdown == other.product_environment_breakdown
  true
end