Class: PublishEvent
- Inherits:
-
Object
- Object
- PublishEvent
- Defined in:
- lib/json/publish_event.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
Returns the value of attribute attributes.
-
#exposures ⇒ Object
Returns the value of attribute exposures.
-
#goals ⇒ Object
Returns the value of attribute goals.
-
#hashed ⇒ Object
Returns the value of attribute hashed.
-
#published_at ⇒ Object
Returns the value of attribute published_at.
-
#units ⇒ Object
Returns the value of attribute units.
Instance Method Summary collapse
- #==(o) ⇒ Object
- #hash_code ⇒ Object
-
#initialize ⇒ PublishEvent
constructor
A new instance of PublishEvent.
- #to_s ⇒ Object
Constructor Details
#initialize ⇒ PublishEvent
Returns a new instance of PublishEvent.
6 7 8 9 |
# File 'lib/json/publish_event.rb', line 6 def initialize @published_at = 0 @hashed = false end |
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
4 5 6 |
# File 'lib/json/publish_event.rb', line 4 def attributes @attributes end |
#exposures ⇒ Object
Returns the value of attribute exposures.
4 5 6 |
# File 'lib/json/publish_event.rb', line 4 def exposures @exposures end |
#goals ⇒ Object
Returns the value of attribute goals.
4 5 6 |
# File 'lib/json/publish_event.rb', line 4 def goals @goals end |
#hashed ⇒ Object
Returns the value of attribute hashed.
4 5 6 |
# File 'lib/json/publish_event.rb', line 4 def hashed @hashed end |
#published_at ⇒ Object
Returns the value of attribute published_at.
4 5 6 |
# File 'lib/json/publish_event.rb', line 4 def published_at @published_at end |
#units ⇒ Object
Returns the value of attribute units.
4 5 6 |
# File 'lib/json/publish_event.rb', line 4 def units @units end |
Instance Method Details
#==(o) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/json/publish_event.rb', line 11 def ==(o) return true if self.object_id == o.object_id return false if o.nil? || self.class != o.class that = o @hashed == that.hashed && @units == that.units && @published_at == that.published_at && @exposures == that.exposures && @goals == that.goals && @attributes == that.attributes end |
#hash_code ⇒ Object
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/json/publish_event.rb', line 21 def hash_code { hashed: @hashed, units: @units, published_at: @published_at, exposures: @exposures, goals: @goals, attributes: @attributes } end |
#to_s ⇒ Object
32 33 34 35 36 37 38 39 40 41 |
# File 'lib/json/publish_event.rb', line 32 def to_s "PublishEvent{" + "hashedUnits=#{@hashed}" + ", units=#{@units.inspect}" + ", publishedAt=#{@published_at}" + ", exposures=#{@exposures.inspect}" + ", goals=#{@goals.inspect}" + ", attributes=#{@attributes!=nil ? @attributes.join : ""}" + "}" end |