Class: Exposure
- Inherits:
-
Object
- Object
- Exposure
- Defined in:
- lib/json/exposure.rb
Instance Attribute Summary collapse
-
#assigned ⇒ Object
Returns the value of attribute assigned.
-
#audience_mismatch ⇒ Object
Returns the value of attribute audience_mismatch.
-
#custom ⇒ Object
Returns the value of attribute custom.
-
#eligible ⇒ Object
Returns the value of attribute eligible.
-
#exposed_at ⇒ Object
Returns the value of attribute exposed_at.
-
#full_on ⇒ Object
Returns the value of attribute full_on.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#overridden ⇒ Object
Returns the value of attribute overridden.
-
#unit ⇒ Object
Returns the value of attribute unit.
-
#variant ⇒ Object
Returns the value of attribute variant.
Instance Method Summary collapse
- #==(o) ⇒ Object
- #hash_code ⇒ Object
-
#initialize(id = nil, name = nil, unit = nil, variant = nil, exposed_at = nil, assigned = nil, eligible = nil, overridden = nil, full_on = nil, custom = nil, audience_mismatch = nil) ⇒ Exposure
constructor
A new instance of Exposure.
- #to_s ⇒ Object
Constructor Details
#initialize(id = nil, name = nil, unit = nil, variant = nil, exposed_at = nil, assigned = nil, eligible = nil, overridden = nil, full_on = nil, custom = nil, audience_mismatch = nil) ⇒ Exposure
Returns a new instance of Exposure.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/json/exposure.rb', line 7 def initialize(id = nil, name = nil, unit = nil, variant = nil, exposed_at = nil, assigned = nil, eligible = nil, overridden = nil, full_on = nil, custom = nil, audience_mismatch = nil) @id = id || 0 @name = name @unit = unit @variant = variant @exposed_at = exposed_at @assigned = assigned @eligible = eligible @overridden = overridden @full_on = full_on @custom = custom @audience_mismatch = audience_mismatch end |
Instance Attribute Details
#assigned ⇒ Object
Returns the value of attribute assigned.
4 5 6 |
# File 'lib/json/exposure.rb', line 4 def assigned @assigned end |
#audience_mismatch ⇒ Object
Returns the value of attribute audience_mismatch.
4 5 6 |
# File 'lib/json/exposure.rb', line 4 def audience_mismatch @audience_mismatch end |
#custom ⇒ Object
Returns the value of attribute custom.
4 5 6 |
# File 'lib/json/exposure.rb', line 4 def custom @custom end |
#eligible ⇒ Object
Returns the value of attribute eligible.
4 5 6 |
# File 'lib/json/exposure.rb', line 4 def eligible @eligible end |
#exposed_at ⇒ Object
Returns the value of attribute exposed_at.
4 5 6 |
# File 'lib/json/exposure.rb', line 4 def exposed_at @exposed_at end |
#full_on ⇒ Object
Returns the value of attribute full_on.
4 5 6 |
# File 'lib/json/exposure.rb', line 4 def full_on @full_on end |
#id ⇒ Object
Returns the value of attribute id.
4 5 6 |
# File 'lib/json/exposure.rb', line 4 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/json/exposure.rb', line 4 def name @name end |
#overridden ⇒ Object
Returns the value of attribute overridden.
4 5 6 |
# File 'lib/json/exposure.rb', line 4 def overridden @overridden end |
#unit ⇒ Object
Returns the value of attribute unit.
4 5 6 |
# File 'lib/json/exposure.rb', line 4 def unit @unit end |
#variant ⇒ Object
Returns the value of attribute variant.
4 5 6 |
# File 'lib/json/exposure.rb', line 4 def variant @variant end |
Instance Method Details
#==(o) ⇒ Object
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/json/exposure.rb', line 24 def ==(o) return true if self.object_id == o.object_id return false if o.nil? || self.class != o.class @id == o.id && @name == o.name && @unit == o.unit && @variant == o.variant && @exposed_at == o.exposed_at && @assigned == o.assigned && @eligible == o.eligible && @overridden == o.overridden && @full_on == o.full_on && @custom == o.custom && @audience_mismatch == o.audience_mismatch end |
#hash_code ⇒ Object
35 36 37 38 39 40 41 42 43 |
# File 'lib/json/exposure.rb', line 35 def hash_code { id: @id, name: @name, unit: @unit, variant: @variant, exposed_at: @exposed_at, assigned: @assigned, eligible: @eligible, overridden: @overridden, full_on: @full_on, custom: @custom, audience_mismatch: @audience_mismatch } end |
#to_s ⇒ Object
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/json/exposure.rb', line 45 def to_s "Exposure{" + "id=#{@id}" + "name='#{@name}'" + ", unit=#{@unit}" + ", variant=#{@variant}" + ", exposed_at=#{@exposed_at}" + ", assigned=#{@assigned}" + ", eligible=#{@eligible}" + ", overridden=#{@overridden}" + ", full_on=#{@full_on}" + ", custom=#{@custom}" + ", audience_mismatch=#{@audience_mismatch}" + "}" end |