Class: Kameleoon::VisitorVisits::Visit
- Inherits:
-
Object
- Object
- Kameleoon::VisitorVisits::Visit
- Defined in:
- lib/kameleoon/data/visitor_visits.rb
Instance Attribute Summary collapse
-
#time_last_activity ⇒ Object
readonly
Returns the value of attribute time_last_activity.
-
#time_started ⇒ Object
readonly
Returns the value of attribute time_started.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(time_started, time_last_activity = nil) ⇒ Visit
constructor
A new instance of Visit.
- #to_s ⇒ Object
Constructor Details
#initialize(time_started, time_last_activity = nil) ⇒ Visit
Returns a new instance of Visit.
63 64 65 66 |
# File 'lib/kameleoon/data/visitor_visits.rb', line 63 def initialize(time_started, time_last_activity = nil) @time_started = time_started @time_last_activity = time_last_activity || time_started end |
Instance Attribute Details
#time_last_activity ⇒ Object (readonly)
Returns the value of attribute time_last_activity.
61 62 63 |
# File 'lib/kameleoon/data/visitor_visits.rb', line 61 def time_last_activity @time_last_activity end |
#time_started ⇒ Object (readonly)
Returns the value of attribute time_started.
61 62 63 |
# File 'lib/kameleoon/data/visitor_visits.rb', line 61 def time_started @time_started end |
Instance Method Details
#==(other) ⇒ Object
72 73 74 |
# File 'lib/kameleoon/data/visitor_visits.rb', line 72 def ==(other) other.is_a?(Visit) && (@time_started == other.time_started) && (@time_last_activity == other.time_last_activity) end |
#to_s ⇒ Object
68 69 70 |
# File 'lib/kameleoon/data/visitor_visits.rb', line 68 def to_s "Visit{time_started:#{@time_started},time_last_activity:#{time_last_activity}}" end |