Class: Charted::Site
- Inherits:
-
Sequel::Model
- Object
- Sequel::Model
- Charted::Site
- Defined in:
- lib/charted/model.rb
Instance Method Summary collapse
-
#initialize(*args) ⇒ Site
constructor
A new instance of Site.
- #visitor_with_cookie(cookie) ⇒ Object
Constructor Details
#initialize(*args) ⇒ Site
Returns a new instance of Site.
33 34 35 36 |
# File 'lib/charted/model.rb', line 33 def initialize(*args) super self.created_at ||= DateTime.now end |
Instance Method Details
#visitor_with_cookie(cookie) ⇒ Object
38 39 40 41 |
# File 'lib/charted/model.rb', line 38 def () visitor = self.visitors_dataset[.to_s.split('-').first.to_i] visitor && visitor. == ? visitor : nil end |