class RuboCop::RSpec::Language::SelectorSet
Set of method selectors
Attributes
selectors[R]
Public Class Methods
new(selectors)
click to toggle source
# File lib/rubocop/rspec/language.rb, line 11 def initialize(selectors) @selectors = selectors end
Public Instance Methods
+(other)
click to toggle source
# File lib/rubocop/rspec/language.rb, line 19 def +(other) self.class.new(selectors + other.selectors) end
==(other)
click to toggle source
# File lib/rubocop/rspec/language.rb, line 15 def ==(other) selectors.eql?(other.selectors) end
block_pattern()
click to toggle source
# File lib/rubocop/rspec/language.rb, line 27 def block_pattern "(block #{send_pattern} ...)" end
include?(selector)
click to toggle source
# File lib/rubocop/rspec/language.rb, line 23 def include?(selector) selectors.include?(selector) end
node_pattern()
click to toggle source
# File lib/rubocop/rspec/language.rb, line 39 def node_pattern selectors.map(&:inspect).join(' ') end
node_pattern_union()
click to toggle source
# File lib/rubocop/rspec/language.rb, line 35 def node_pattern_union "{#{node_pattern}}" end
send_pattern()
click to toggle source
# File lib/rubocop/rspec/language.rb, line 31 def send_pattern "(send #{RSPEC} #{node_pattern_union} ...)" end