Class: UtmTracker::Matcher

Inherits:
Object
  • Object
show all
Defined in:
lib/utm_tracker/matcher.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(utm_data, utm = {}) ⇒ Matcher

Returns a new instance of Matcher.



7
8
9
10
# File 'lib/utm_tracker/matcher.rb', line 7

def initialize(utm_data, utm = {})
  @utm_data = utm_data.transform_keys!(&:to_sym)
  @utm = utm
end

Instance Attribute Details

#utmObject

Returns the value of attribute utm.



5
6
7
# File 'lib/utm_tracker/matcher.rb', line 5

def utm
  @utm
end

#utm_dataObject

Returns the value of attribute utm_data.



5
6
7
# File 'lib/utm_tracker/matcher.rb', line 5

def utm_data
  @utm_data
end

Instance Method Details

#callObject



12
13
14
15
16
17
18
# File 'lib/utm_tracker/matcher.rb', line 12

def call
  utm_source
  utm_content
  utm_medium
  utm_campaign
  utm_term
end