Class: SpecGuard::RSpec::IngestCLI::Options

Inherits:
Struct
  • Object
show all
Defined in:
lib/specguard/rspec/ingest_cli.rb

Overview

What the command line asked for. A struct rather than a bare path, because --from-line is the second half of the same question — which lines of which file — and threading it as an ivar would put a value #run depends on somewhere #run does not name. line_set is that same half asked the other way, as an explicit set rather than a starting point, and the two are mutually exclusive (see the class comment). list is the third half: whether those lines are to be shown or sent. json is orthogonal to all three — it chooses the renderer, never the set and never the verdict.

line_set is an Array of Ranges rather than an expanded Array of Integers, so --lines 1-90000000 costs nothing to hold. nil means the flag was not given and from_line is the selector.

Instance Attribute Summary collapse

Instance Attribute Details

#from_lineObject

Returns the value of attribute from_line

Returns:

  • (Object)

    the current value of from_line



353
354
355
# File 'lib/specguard/rspec/ingest_cli.rb', line 353

def from_line
  @from_line
end

#jsonObject

Returns the value of attribute json

Returns:

  • (Object)

    the current value of json



353
354
355
# File 'lib/specguard/rspec/ingest_cli.rb', line 353

def json
  @json
end

#line_setObject

Returns the value of attribute line_set

Returns:

  • (Object)

    the current value of line_set



353
354
355
# File 'lib/specguard/rspec/ingest_cli.rb', line 353

def line_set
  @line_set
end

#listObject

Returns the value of attribute list

Returns:

  • (Object)

    the current value of list



353
354
355
# File 'lib/specguard/rspec/ingest_cli.rb', line 353

def list
  @list
end

#pathObject

Returns the value of attribute path

Returns:

  • (Object)

    the current value of path



353
354
355
# File 'lib/specguard/rspec/ingest_cli.rb', line 353

def path
  @path
end