module OneHundred
  module DeviceSizeManager
    module_function

    def select_sizes
      case UIDevice.currentDevice.name
        when /iPhone/; SizesIPhone.new
        when /iPod/;   SizesIPhone.new
        when /iPad/  ; SizesIPad.new
        else
          puts "Unsupported Device [#{UIDevice.currentDevice.name}] is detected." if BW2.debug?
          SizesIPhone.new
      end
    end
  end
end

OH = OneHundred unless defined?(OH)
module OneHundred
  module DeviceSizeManager
    module_function

    def select_sizes
      case UIDevice.currentDevice.model
        when /iPhone/; SizesIPhone.new
        when /iPod/;   SizesIPhone.new
        when /iPad/  ; SizesIPad.new
        else
          puts "Unsupported Device [#{UIDevice.currentDevice.model}] is detected." if BW2.debug?
          SizesIPhone.new
      end
    end
  end
end

OH = OneHundred unless defined?(OH)
Fix broken layout for iPad on Simulator
Fix broken layout for iPad on Simulator

 - now UIDevice.currnet(Device) returns Mac name.
     This method had been returned Simulator device name

 - so, use "model" instead of "name" from now on.
