Class: StepMaster::Possible

Inherits:
Hash
  • Object
show all
Defined in:
lib/step_master/possible.rb

Constant Summary collapse

EMPTY =
Possible.new

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#file_pathObject (readonly)

Returns the value of attribute file_path.



5
6
7
# File 'lib/step_master/possible.rb', line 5

def file_path
  @file_path
end

#line_numberObject (readonly)

Returns the value of attribute line_number.



5
6
7
# File 'lib/step_master/possible.rb', line 5

def line_number
  @line_number
end

Instance Method Details

#fileObject



22
23
24
25
26
# File 'lib/step_master/possible.rb', line 22

def file
	if @file_path
		[@file_path, @line_number].compact.join(":")
	end
end

#resultObject



18
19
20
# File 'lib/step_master/possible.rb', line 18

def result
	@result
end

#terminal!(result, options = {}) ⇒ Object



7
8
9
10
11
12
# File 'lib/step_master/possible.rb', line 7

def terminal!(result, options = {})
	@terminal = true
	@result = result
	@file_path = options[:file_path].freeze
	@line_number = options[:line_number].freeze
end

#terminal?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/step_master/possible.rb', line 14

def terminal?
	@terminal
end