Class: RspecStarter::StepContext

Inherits:
Object
  • Object
show all
Defined in:
lib/rspec_starter/step_context.rb

Overview

StepContext is an abstract class. Subclasses hold the information from the RspecStarter.start block when the block is parsed, but they don’t actually execute Steps. Their job is to instantiate Step objects, and bind the appropriate options to the objects so they can execute correctly.

Direct Known Subclasses

CommandContext, TaskContext

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(environment:, id:, requested_args:) ⇒ StepContext

Returns a new instance of StepContext.



8
9
10
11
12
# File 'lib/rspec_starter/step_context.rb', line 8

def initialize(environment:, id:, requested_args:)
  @environment = environment
  @id = id
  @requested_args = requested_args
end

Instance Attribute Details

#environmentObject (readonly)

Returns the value of attribute environment.



6
7
8
# File 'lib/rspec_starter/step_context.rb', line 6

def environment
  @environment
end

#idObject (readonly)

Returns the value of attribute id.



6
7
8
# File 'lib/rspec_starter/step_context.rb', line 6

def id
  @id
end

#requested_argsObject (readonly)

Returns the value of attribute requested_args.



6
7
8
# File 'lib/rspec_starter/step_context.rb', line 6

def requested_args
  @requested_args
end