Sha256: 7d80e76ab6f348bd6889e5bae4ffc3dbd26f195d669e33c32ae0c6f746b55de6

Contents?: true

Size: 1.06 KB

Versions: 11

Compression:

Stored size: 1.06 KB

Contents

module Calabash
  module IOS
    # @!visibility private
    module Routes
      # @!visibility private
      module MapRouteMixin

        # @!visibility private
        def map_route(query, method_name, *method_args)
          request = make_map_request(query, method_name, *method_args)
          response = route_post_request(request)
          route_handle_response(response, query)
        end

        private

        def make_map_parameters(query, method_name, *method_args)
          {
                :operation =>
                      {
                            :method_name => method_name,
                            :arguments => method_args
                      },
                :query => query
          }
        end

        def make_map_request(query, method_name, *method_args)
          parameters = make_map_parameters(query, method_name, *method_args)
          begin
            Calabash::HTTP::Request.request('map', parameters)
          rescue => e
            raise Calabash::IOS::RouteError, e
          end
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
calabash-2.0.0.pre11 lib/calabash/ios/device/routes/map_route_mixin.rb
calabash-2.0.0.pre10 lib/calabash/ios/device/routes/map_route_mixin.rb
calabash-2.0.0.pre9 lib/calabash/ios/device/routes/map_route_mixin.rb
calabash-2.0.0.prelegacy4 lib/calabash/ios/device/routes/map_route_mixin.rb
calabash-2.0.0.prelegacy3 lib/calabash/ios/device/routes/map_route_mixin.rb
calabash-2.0.0.prelegacy2 lib/calabash/ios/device/routes/map_route_mixin.rb
calabash-2.0.0.prelegacy lib/calabash/ios/device/routes/map_route_mixin.rb
calabash-2.0.0.pre6 lib/calabash/ios/device/routes/map_route_mixin.rb
calabash-2.0.0.pre5 lib/calabash/ios/device/routes/map_route_mixin.rb
calabash-2.0.0.pre4 lib/calabash/ios/device/routes/map_route_mixin.rb
calabash-2.0.0.pre3 lib/calabash/ios/device/routes/map_route_mixin.rb