Class: SpecGuard::RSpec::FileSelector::Selection

Inherits:
Data
  • Object
show all
Defined in:
lib/specguard/rspec/file_selector.rb

Overview

What a selection produced, plus enough context to report it honestly.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(files:, mode:, base: nil, note: nil, stats: nil) ⇒ Selection

Returns a new instance of Selection.



93
94
95
# File 'lib/specguard/rspec/file_selector.rb', line 93

def initialize(files:, mode:, base: nil, note: nil, stats: nil)
  super
end

Instance Attribute Details

#baseObject (readonly)

Returns the value of attribute base

Returns:

  • (Object)

    the current value of base



92
93
94
# File 'lib/specguard/rspec/file_selector.rb', line 92

def base
  @base
end

#filesObject (readonly)

Returns the value of attribute files

Returns:

  • (Object)

    the current value of files



92
93
94
# File 'lib/specguard/rspec/file_selector.rb', line 92

def files
  @files
end

#modeObject (readonly)

Returns the value of attribute mode

Returns:

  • (Object)

    the current value of mode



92
93
94
# File 'lib/specguard/rspec/file_selector.rb', line 92

def mode
  @mode
end

#noteObject (readonly)

Returns the value of attribute note

Returns:

  • (Object)

    the current value of note



92
93
94
# File 'lib/specguard/rspec/file_selector.rb', line 92

def note
  @note
end

#statsObject (readonly)

Returns the value of attribute stats

Returns:

  • (Object)

    the current value of stats



92
93
94
# File 'lib/specguard/rspec/file_selector.rb', line 92

def stats
  @stats
end

Instance Method Details

#countObject



101
102
103
# File 'lib/specguard/rspec/file_selector.rb', line 101

def count
  files.length
end

#empty?Boolean

Returns:

  • (Boolean)


97
98
99
# File 'lib/specguard/rspec/file_selector.rb', line 97

def empty?
  files.empty?
end