Module: BrowsingHistory::Browser::IdentifyMethods

Defined in:
lib/browsing_history/browser.rb

Instance Method Summary collapse

Instance Method Details

#browser_classObject



20
21
22
# File 'lib/browsing_history/browser.rb', line 20

def browser_class
  browser_instance? ? self.class : self
end

#browser_idObject



12
13
14
# File 'lib/browsing_history/browser.rb', line 12

def browser_id
  browser_instance? ? id : nil
end

#browser_instance?Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/browsing_history/browser.rb', line 24

def browser_instance?
  !instance_of?(Object)
end

#browser_typeObject



16
17
18
# File 'lib/browsing_history/browser.rb', line 16

def browser_type
  browser_instance? ? self.class.to_s : to_s
end