Class: GustoEmbedded::Models::Shared::Earnings
- Inherits:
-
Object
- Object
- GustoEmbedded::Models::Shared::Earnings
- Extended by:
- T::Sig
- Includes:
- Crystalline::MetadataFields
- Defined in:
- lib/gusto_embedded/models/shared/earnings.rb
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(amount: nil, hours: nil, earning_type: nil, earning_id: nil) ⇒ Earnings
constructor
A new instance of Earnings.
Methods included from Crystalline::MetadataFields
#field, #fields, included, #marshal_single, #to_dict, #to_json
Constructor Details
#initialize(amount: nil, hours: nil, earning_type: nil, earning_id: nil) ⇒ Earnings
Returns a new instance of Earnings.
25 26 27 28 29 30 |
# File 'lib/gusto_embedded/models/shared/earnings.rb', line 25 def initialize(amount: nil, hours: nil, earning_type: nil, earning_id: nil) @amount = amount @hours = hours @earning_type = earning_type @earning_id = earning_id end |
Instance Method Details
#==(other) ⇒ Object
33 34 35 36 37 38 39 40 |
# File 'lib/gusto_embedded/models/shared/earnings.rb', line 33 def ==(other) return false unless other.is_a? self.class return false unless @amount == other.amount return false unless @hours == other.hours return false unless @earning_type == other.earning_type return false unless @earning_id == other.earning_id true end |