Module: WurflDevice
- Defined in:
- lib/wurfl_device.rb,
lib/wurfl_device/ui.rb,
lib/wurfl_device/cli.rb,
lib/wurfl_device/cache.rb,
lib/wurfl_device/version.rb,
lib/wurfl_device/settings.rb,
lib/wurfl_device/capability.rb,
lib/wurfl_device/rpc_server.rb,
lib/wurfl_device/user_agent.rb,
lib/wurfl_device/xml_loader.rb,
lib/wurfl_device/user_agent_matcher.rb
Defined Under Namespace
Modules: Cache
Classes: CLI, CacheError, Capability, RpcServer, Settings, UI, UserAgent, UserAgentMatcher, WurflDeviceError, XMLFileError, XmlLoader
Constant Summary
collapse
- VERSION =
"0.2.4".freeze
Class Attribute Summary collapse
Class Method Summary
collapse
Class Attribute Details
.ui ⇒ Object
29
30
31
|
# File 'lib/wurfl_device.rb', line 29
def ui
@ui ||= UI.new
end
|
Class Method Details
.capabilities_from_id(device_id) ⇒ Object
33
34
35
36
|
# File 'lib/wurfl_device.rb', line 33
def capabilities_from_id(device_id)
capabilities = Cache.build_capabilities(device_id)
capabilities
end
|
.capabilities_from_user_agent(user_agent) ⇒ Object
38
39
40
41
42
|
# File 'lib/wurfl_device.rb', line 38
def capabilities_from_user_agent(user_agent)
matcher = UserAgentMatcher.new
matcher.match(user_agent)
matcher.capabilities
end
|