Class: TestTrack::LazyVisitorByIdentity

Inherits:
Object
  • Object
show all
Defined in:
app/models/test_track/lazy_visitor_by_identity.rb

Instance Method Summary collapse

Constructor Details

#initialize(identity) ⇒ LazyVisitorByIdentity

Returns a new instance of LazyVisitorByIdentity.



2
3
4
# File 'app/models/test_track/lazy_visitor_by_identity.rb', line 2

def initialize(identity)
  @identity = identity
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args, &block) ⇒ Object (private)



16
17
18
19
20
21
22
# File 'app/models/test_track/lazy_visitor_by_identity.rb', line 16

def method_missing(method, *args, &block)
  if __visitor__.respond_to?(method)
    __visitor__.send(method, *args, &block)
  else
    super
  end
end

Instance Method Details

#id_loaded?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'app/models/test_track/lazy_visitor_by_identity.rb', line 10

def id_loaded?
  loaded?
end

#loaded?Boolean

Returns:

  • (Boolean)


6
7
8
# File 'app/models/test_track/lazy_visitor_by_identity.rb', line 6

def loaded?
  @__visitor__.present?
end