Class: Typocop::Cops
- Inherits:
-
Object
- Object
- Typocop::Cops
- Defined in:
- lib/typocop/cops.rb
Instance Attribute Summary collapse
-
#cops ⇒ Object
readonly
Returns the value of attribute cops.
-
#line ⇒ Object
readonly
Returns the value of attribute line.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(cops_data) ⇒ Cops
constructor
A new instance of Cops.
Constructor Details
#initialize(cops_data) ⇒ Cops
Returns a new instance of Cops.
5 6 7 8 9 |
# File 'lib/typocop/cops.rb', line 5 def initialize(cops_data) @cops = cops_data.map do |data| Cop.new(data[:path], data[:line], data[:typos]) end end |
Instance Attribute Details
#cops ⇒ Object (readonly)
Returns the value of attribute cops.
3 4 5 |
# File 'lib/typocop/cops.rb', line 3 def cops @cops end |
#line ⇒ Object (readonly)
Returns the value of attribute line.
3 4 5 |
# File 'lib/typocop/cops.rb', line 3 def line @line end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
3 4 5 |
# File 'lib/typocop/cops.rb', line 3 def path @path end |