Class: Hound::Config::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/hound/config/base.rb

Direct Known Subclasses

Eslint, Ruby, Scss, Tslint

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#linters_file_nameObject (readonly)

Returns the value of attribute linters_file_name.



4
5
6
# File 'lib/hound/config/base.rb', line 4

def linters_file_name
  @linters_file_name
end

Instance Method Details

#hound_yml_configObject



10
11
12
13
14
15
# File 'lib/hound/config/base.rb', line 10

def hound_yml_config
  {
    "enabled" => true,
    "config_file" => linters_file_name
  }
end

#linters_file_path(local = false) ⇒ Object



17
18
19
20
# File 'lib/hound/config/base.rb', line 17

def linters_file_path(local = false)
  from = local ? "." : "~"
  File.join(File.expand_path(from), linters_file_name)
end

#nameObject



6
7
8
# File 'lib/hound/config/base.rb', line 6

def name
  name_from_class
end

#rules_urlObject



22
23
24
# File 'lib/hound/config/base.rb', line 22

def rules_url
  HoundConfig.rules_url_for(name)
end