lib/xrandr.rb in xrandr-0.0.3 vs lib/xrandr.rb in xrandr-0.0.4

- old
+ new

@@ -1,7 +1,7 @@ module Xrandr - VERSION = '0.0.3' + VERSION = '0.0.4' class Control attr_reader :screens, :outputs, :command def initialize(parser = Parser.new) @@ -81,10 +81,11 @@ # Coherce parameters args[:connected] = args[:connected] == 'connected' args[:primary] = args[:primary] == 'primary' # Parse modes - args[:modes] = parse_modes(modes) + + args[:modes] = args[:connected] ? parse_modes(modes) : [] Output.new args end def parse_modes(modes)