class Object
Public Instance Methods
Source
# File lib/rubocop/rspec/shared_contexts.rb, line 120 def source_range(range, buffer: source_buffer) Parser::Source::Range.new(buffer, range.begin, range.exclude_end? ? range.end : range.end + 1) end
Utilities
Source
# File lib/rubocop/rspec/shared_contexts.rb, line 76 def stub_cop_class(name, inherit: RuboCop::Cop::Base, &block) klass = Class.new(inherit, &block) stub_const(name, klass) klass end