Class: Kameleoon::VisitorVisits
- Inherits:
-
Object
- Object
- Kameleoon::VisitorVisits
- Defined in:
- lib/kameleoon/data/visitor_visits.rb
Instance Attribute Summary collapse
-
#previous_visit_timestamps ⇒ Object
readonly
Returns the value of attribute previous_visit_timestamps.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(previous_visit_timestamps = []) ⇒ VisitorVisits
constructor
A new instance of VisitorVisits.
- #to_s ⇒ Object
Constructor Details
#initialize(previous_visit_timestamps = []) ⇒ VisitorVisits
Returns a new instance of VisitorVisits.
11 12 13 14 |
# File 'lib/kameleoon/data/visitor_visits.rb', line 11 def initialize( = []) @previous_visit_timestamps = @previous_visit_timestamps.freeze end |
Instance Attribute Details
#previous_visit_timestamps ⇒ Object (readonly)
Returns the value of attribute previous_visit_timestamps.
5 6 7 |
# File 'lib/kameleoon/data/visitor_visits.rb', line 5 def @previous_visit_timestamps end |
Class Method Details
.get_previous_visit_timestamps(visitor_visits) ⇒ Object
16 17 18 |
# File 'lib/kameleoon/data/visitor_visits.rb', line 16 def self.(visitor_visits) visitor_visits.is_a?(VisitorVisits) ? visitor_visits. : [] end |
.visitor_visits?(obj) ⇒ Boolean
20 21 22 |
# File 'lib/kameleoon/data/visitor_visits.rb', line 20 def self.visitor_visits?(obj) obj.nil? || obj.is_a?(VisitorVisits) end |
Instance Method Details
#to_s ⇒ Object
7 8 9 |
# File 'lib/kameleoon/data/visitor_visits.rb', line 7 def to_s "VisitorVisits{previous_visit_timestamps:#{@previous_visit_timestamps}}" end |