class Leftovers::DefinitionSet

Attributes

definitions[R]

Public Class Methods

new(definitions) click to toggle source
# File lib/leftovers/definition_set.rb, line 7
def initialize(definitions)
  @definitions = definitions

  freeze
end

Public Instance Methods

highlighted_source(*args) click to toggle source
# File lib/leftovers/definition_set.rb, line 25
def highlighted_source(*args)
  @definitions.first.highlighted_source(*args)
end
in_collection?() click to toggle source
# File lib/leftovers/definition_set.rb, line 29
def in_collection?
  @definitions.any?(&:in_collection?)
end
in_test_collection?() click to toggle source
# File lib/leftovers/definition_set.rb, line 37
def in_test_collection?
  @definitions.any?(&:in_test_collection?)
end
location_s() click to toggle source
# File lib/leftovers/definition_set.rb, line 21
def location_s
  @definitions.first.location_s
end
names() click to toggle source
# File lib/leftovers/definition_set.rb, line 13
def names
  @definitions.map(&:names)
end
test?() click to toggle source
# File lib/leftovers/definition_set.rb, line 33
def test?
  @definitions.any?(&:test?)
end
to_s() click to toggle source
# File lib/leftovers/definition_set.rb, line 17
def to_s
  @definitions.map(&:to_s).join(', ')
end