Module: CASino::BrowserProcessor

Extended by:
ActiveSupport::Concern
Included in:
TicketGrantingTicketProcessor
Defined in:
app/processors/casino/browser_processor.rb

Instance Method Summary collapse

Instance Method Details

#browser_info(user_agent) ⇒ Object


4
5
6
7
# File 'app/processors/casino/browser_processor.rb', line 4

def browser_info(user_agent)
  user_agent = UserAgent.parse(user_agent)
  "#{user_agent.browser} (#{user_agent.platform})"
end

#same_browser?(user_agent, other_user_agent) ⇒ Boolean

Returns:

  • (Boolean)

9
10
11
# File 'app/processors/casino/browser_processor.rb', line 9

def same_browser?(user_agent, other_user_agent)
  user_agent == other_user_agent || browser_info(user_agent) == browser_info(other_user_agent)
end