Class: HamlI18nLint::Options
- Inherits:
-
Object
- Object
- HamlI18nLint::Options
- Defined in:
- lib/haml_i18n_lint/options.rb
Instance Attribute Summary collapse
-
#config_path ⇒ String
Path to config file.
-
#files ⇒ Array<String>
File patterns to list the files to be linted.
Instance Method Summary collapse
-
#config_content ⇒ String
The content of config_path.
Instance Attribute Details
#config_path ⇒ String
Returns path to config file.
7 8 9 |
# File 'lib/haml_i18n_lint/options.rb', line 7 def config_path @config_path end |
#files ⇒ Array<String>
Returns file patterns to list the files to be linted.
21 22 23 |
# File 'lib/haml_i18n_lint/options.rb', line 21 def files @files ||= ["**/*.haml"] end |
Instance Method Details
#config_content ⇒ String
Returns the content of config_path.
12 13 14 15 16 17 18 |
# File 'lib/haml_i18n_lint/options.rb', line 12 def config_content unless config_path && File.exist?(config_path) raise LoadConfigError, "Config not exist: #{config_path.inspect}" end File.read(config_path) end |