Parent

Files

Class/Module Index [+]

Quicksearch

RuboCop::Cop::CopStore

Store for all cops with helper functions

Public Instance Methods

types() click to toggle source

@return [Array<String>] list of types for current cops.

# File lib/rubocop/cop/cop.rb, line 10
def types
  @types = map(&:cop_type).uniq! unless defined? @types
  @types
end
with_type(type) click to toggle source

@return [Array<Cop>] Cops for that specific type.

# File lib/rubocop/cop/cop.rb, line 16
def with_type(type)
  select { |c| c.cop_type == type }
end
without_type(type) click to toggle source

@return [Array<Cop>] Cops not for a specific type.

# File lib/rubocop/cop/cop.rb, line 21
def without_type(type)
  reject { |c| c.cop_type == type }
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.