Class: Omniture
- Inherits:
-
Object
- Object
- Omniture
- Defined in:
- app/models/omniture.rb
Class Attribute Summary collapse
-
.application_name ⇒ Object
Returns the value of attribute application_name.
-
.enabled ⇒ Object
Returns the value of attribute enabled.
-
.sprop_mappings ⇒ Object
Returns the value of attribute sprop_mappings.
-
.tracking_account ⇒ Object
Returns the value of attribute tracking_account.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(params) ⇒ Omniture
constructor
A new instance of Omniture.
-
#method_missing(method) ⇒ Object
read attributes from the params or return blank if not available.
Constructor Details
#initialize(params) ⇒ Omniture
Returns a new instance of Omniture.
2 3 4 |
# File 'app/models/omniture.rb', line 2 def initialize(params) @params = params end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method) ⇒ Object
read attributes from the params or return blank if not available.
7 8 9 10 11 12 13 |
# File 'app/models/omniture.rb', line 7 def method_missing(method) if @params.include?(method.to_s) @params[method.to_s] else '' end end |
Class Attribute Details
.application_name ⇒ Object
Returns the value of attribute application_name.
16 17 18 |
# File 'app/models/omniture.rb', line 16 def application_name @application_name end |
.enabled ⇒ Object
Returns the value of attribute enabled.
16 17 18 |
# File 'app/models/omniture.rb', line 16 def enabled @enabled end |
.sprop_mappings ⇒ Object
Returns the value of attribute sprop_mappings.
16 17 18 |
# File 'app/models/omniture.rb', line 16 def sprop_mappings @sprop_mappings end |
.tracking_account ⇒ Object
Returns the value of attribute tracking_account.
16 17 18 |
# File 'app/models/omniture.rb', line 16 def tracking_account @tracking_account end |
Class Method Details
.enabled? ⇒ Boolean
18 19 20 |
# File 'app/models/omniture.rb', line 18 def enabled? enabled end |
.sprop_for(property) ⇒ Object
22 23 24 25 26 27 28 29 30 |
# File 'app/models/omniture.rb', line 22 def sprop_for property sprop = sprop_mappings[property] Exception.log_and_raise("No sprop has been configured for enabling tracking of #{property}") do raise(NotConfiguredException) end if sprop.nil? return sprop.to_s end |