Class: MobilePath::Configuration
- Inherits:
-
Object
- Object
- MobilePath::Configuration
- Includes:
- Singleton
- Defined in:
- lib/mobile_path/configuration.rb
Constant Summary collapse
- @@defaults =
{ :subdomain => 'm', :mobile_view_path => "mobile_views", :mobile_device_regex => /('palm|blackberry|nokia|phone|midp|mobi|symbian|chtml|ericsson|minimo|' + 'audiovox|motorola|samsung|telit|upg1|windows ce|ucweb|astel|plucker|' + 'x320|x240|j2me|sgh|portable|sprint|docomo|kddi|softbank|android|mmp|' + 'pdxgw|netfront|xiino|vodafone|portalmmm|sagem|mot-|sie-|ipod|up\\.b|' + 'webos|amoi|novarra|cdm|alcatel|pocket|ipad|iphone|mobileexplorer|' + 'mobile')/i }
Instance Attribute Summary collapse
-
#mobile_device_regex ⇒ Object
Returns the value of attribute mobile_device_regex.
-
#mobile_view_path ⇒ Object
Returns the value of attribute mobile_view_path.
-
#subdomain ⇒ Object
Returns the value of attribute subdomain.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
40 41 42 |
# File 'lib/mobile_path/configuration.rb', line 40 def initialize @@defaults.each_pair{|k,v| self.send("#{k}=",v)} end |
Instance Attribute Details
#mobile_device_regex ⇒ Object
Returns the value of attribute mobile_device_regex.
44 45 46 |
# File 'lib/mobile_path/configuration.rb', line 44 def mobile_device_regex @mobile_device_regex end |
#mobile_view_path ⇒ Object
Returns the value of attribute mobile_view_path.
44 45 46 |
# File 'lib/mobile_path/configuration.rb', line 44 def mobile_view_path @mobile_view_path end |
#subdomain ⇒ Object
Returns the value of attribute subdomain.
44 45 46 |
# File 'lib/mobile_path/configuration.rb', line 44 def subdomain @subdomain end |
Class Method Details
.defaults ⇒ Object
36 37 38 |
# File 'lib/mobile_path/configuration.rb', line 36 def self.defaults @@defaults end |