Sha256: 9699ccb980e379212b7a2e9d8717e73ebab3d26cde6c5f1c5b5bf1f04550d81c

Contents?: true

Size: 418 Bytes

Versions: 10

Compression:

Stored size: 418 Bytes

Contents

module Mohawk
  module Accessors
    class MenuItem
      def initialize(adapter, locator)
        @adapter = adapter
        @locator = locator
      end

      def select
        menu_item.open
      end

      private
      def menu_item
        @locator[:path].reduce(@adapter.window) do |the_menu, menu_item|
          the_menu.menu :text => menu_item
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
mohawk-0.1.4 lib/mohawk/accessors/menu_item.rb
mohawk-0.1.0 lib/mohawk/accessors/menu_item.rb
mohawk-0.0.9 lib/mohawk/accessors/menu_item.rb
mohawk-0.0.8 lib/mohawk/accessors/menu_item.rb
mohawk-0.0.7 lib/mohawk/accessors/menu_item.rb
mohawk-0.0.6 lib/mohawk/accessors/menu_item.rb
mohawk-0.0.5 lib/mohawk/accessors/menu_item.rb
mohawk-0.0.4 lib/mohawk/accessors/menu_item.rb
mohawk-0.0.3 lib/mohawk/accessors/menu_item.rb
mohawk-0.0.2 lib/mohawk/accessors/menu_item.rb