Class: RubomaticHtml::Cop::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/rubomatic-html/cop/base.rb

Direct Known Subclasses

Layout::Base, Style::Base

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(file, config) ⇒ Base

:nodoc:



35
36
37
38
# File 'lib/rubomatic-html/cop/base.rb', line 35

def initialize(file, config)
  @file = file
  @config = config
end

Instance Attribute Details

#configHash

Returns:

  • (Hash)


9
10
11
# File 'lib/rubomatic-html/cop/base.rb', line 9

def config
  @config
end

#fileString

Returns:

  • (String)


7
8
9
# File 'lib/rubomatic-html/cop/base.rb', line 7

def file
  @file
end

Class Method Details

.abstract_cop?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/rubomatic-html/cop/base.rb', line 13

def abstract_cop?
  true
end

.allowed_config_transformHash

Returns a hash whose keys represent the allowed config options and the values transform them from YML to ruby

Returns:

  • (Hash)


29
30
31
# File 'lib/rubomatic-html/cop/base.rb', line 29

def allowed_config_transform
  {}.freeze
end

.nameString

Name for cop

Returns:

  • (String)


21
22
23
# File 'lib/rubomatic-html/cop/base.rb', line 21

def name
  'Base'
end