Module: WurflStore::View
- Defined in:
- lib/wurfl_store/view.rb
Instance Method Summary collapse
Instance Method Details
#handset ⇒ Object
4 5 6 |
# File 'lib/wurfl_store/view.rb', line 4 def handset WurflStore.get_handset(session[:handset_agent]) end |
#handset_capability(capability) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/wurfl_store/view.rb', line 8 def handset_capability(capability) return nil if handset.nil? capability = handset[capability] return nil if capability.nil? case capability.strip when /^d+$/ capability = capability.to_i when /^true$/i capability = true when /^false$/i capability = false end return capability end |