Sha256: 5b14f128b45db148908884e1f6e06e277f0635ea4feab37d8c190fbeb2b478be

Contents?: true

Size: 625 Bytes

Versions: 27

Compression:

Stored size: 625 Bytes

Contents

module Cucumber
  module WireSupport
    class WireStepDefinition
      attr_reader :regexp_source, :file_colon_line

      def initialize(connection, data)
        @connection = connection
        @id              = data['id']
        @regexp_source   = data['regexp'] || "Unknown"
        @file_colon_line = data['source'] || "Unknown"
      end

      def invoke(args)
        prepared_args = args.map{ |arg| prepare(arg) }
        @connection.invoke(@id, prepared_args)
      end

      private

      def prepare(arg)
        return arg unless arg.is_a?(Cucumber::Ast::Table)
        arg.raw
      end
    end
  end
end

Version data entries

27 entries across 25 versions & 2 rubygems

Version Path
honeybadger-2.4.0 vendor/gems/ruby/2.2.0/gems/cucumber-1.3.18/lib/cucumber/wire_support/wire_step_definition.rb
honeybadger-2.4.0 vendor/gems/ruby/2.1.0/gems/cucumber-1.3.16/lib/cucumber/wire_support/wire_step_definition.rb
honeybadger-2.4.0 vendor/gems/ruby/1.9.1/gems/cucumber-1.3.18/lib/cucumber/wire_support/wire_step_definition.rb
cucumber-1.3.20 lib/cucumber/wire_support/wire_step_definition.rb
cucumber-1.3.19 lib/cucumber/wire_support/wire_step_definition.rb
cucumber-1.3.18 lib/cucumber/wire_support/wire_step_definition.rb
cucumber-1.3.17 lib/cucumber/wire_support/wire_step_definition.rb
cucumber-1.3.16 lib/cucumber/wire_support/wire_step_definition.rb
cucumber-1.3.15 lib/cucumber/wire_support/wire_step_definition.rb
cucumber-1.3.14 lib/cucumber/wire_support/wire_step_definition.rb
cucumber-1.3.13 lib/cucumber/wire_support/wire_step_definition.rb
cucumber-1.3.12 lib/cucumber/wire_support/wire_step_definition.rb
cucumber-1.3.11 lib/cucumber/wire_support/wire_step_definition.rb
cucumber-1.3.10 lib/cucumber/wire_support/wire_step_definition.rb
cucumber-1.3.9 lib/cucumber/wire_support/wire_step_definition.rb
cucumber-1.3.8 lib/cucumber/wire_support/wire_step_definition.rb
cucumber-1.3.7 lib/cucumber/wire_support/wire_step_definition.rb
cucumber-1.3.6 lib/cucumber/wire_support/wire_step_definition.rb
cucumber-1.3.5 lib/cucumber/wire_support/wire_step_definition.rb
cucumber-1.3.4 lib/cucumber/wire_support/wire_step_definition.rb