Class: MobilePath::Configuration

Inherits:
Object
  • Object
show all
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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

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_regexObject

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_pathObject

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

#subdomainObject

Returns the value of attribute subdomain.



44
45
46
# File 'lib/mobile_path/configuration.rb', line 44

def subdomain
  @subdomain
end

Class Method Details

.defaultsObject



36
37
38
# File 'lib/mobile_path/configuration.rb', line 36

def self.defaults
  @@defaults
end