Class: Crispy::DesktopDevice

Inherits:
Device
  • Object
show all
Defined in:
lib/crispy-mobile/device.rb

Constant Summary

Constants inherited from Device

Crispy::Device::SUPPORTED_DISPLAY_WIDTHS

Instance Attribute Summary

Attributes inherited from Device

#profile

Instance Method Summary collapse

Methods inherited from Device

#<=>, #to_s

Constructor Details

#initialize(profile = WURFL::Hash.new) ⇒ DesktopDevice

Returns a new instance of DesktopDevice.



37
38
39
40
# File 'lib/crispy-mobile/device.rb', line 37

def initialize(profile = WURFL::Hash.new)
  profile.reverse_merge! resolution_width: display_width, id: 'desktop'
  super(profile)
end

Instance Method Details

#display_widthObject



42
43
44
# File 'lib/crispy-mobile/device.rb', line 42

def display_width
  SUPPORTED_DISPLAY_WIDTHS[:desktop] || 1024
end