Class: Cucumber::WireSupport::WireStepDefinition

Inherits:
Object
  • Object
show all
Defined in:
lib/cucumber/wire_support/wire_step_definition.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(connection, data) ⇒ WireStepDefinition

Returns a new instance of WireStepDefinition.



6
7
8
9
10
11
# File 'lib/cucumber/wire_support/wire_step_definition.rb', line 6

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

Instance Attribute Details

#file_colon_lineObject (readonly)

Returns the value of attribute file_colon_line.



4
5
6
# File 'lib/cucumber/wire_support/wire_step_definition.rb', line 4

def file_colon_line
  @file_colon_line
end

#regexp_sourceObject (readonly)

Returns the value of attribute regexp_source.



4
5
6
# File 'lib/cucumber/wire_support/wire_step_definition.rb', line 4

def regexp_source
  @regexp_source
end

Instance Method Details

#invoke(args) ⇒ Object



13
14
15
16
# File 'lib/cucumber/wire_support/wire_step_definition.rb', line 13

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