Skip to content

Commit

Permalink
Change to use common location for corpora
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrmurach committed Jan 20, 2018
1 parent b78ac1b commit c2a74ce
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
File renamed without changes.
2 changes: 2 additions & 0 deletions lib/queen/rule.rb
Expand Up @@ -10,6 +10,8 @@ module Queen
class Rule
extend Queen::Rules

CORPORA_PATH = Pathname(::File.join(__dir__, 'corpora')).freeze

attr_reader :reprimands

attr_reader :pastel
Expand Down
2 changes: 1 addition & 1 deletion lib/queen/rules/profanity.rb
Expand Up @@ -17,7 +17,7 @@ class Profanity < Queen::Rule

def initialize(**options)
super
file_path = ::File.join(__dir__, 'profanities.yml')
file_path = CORPORA_PATH.join('profanities.yml')
@profanities_dict = YAML.load_file(file_path)
end

Expand Down

0 comments on commit c2a74ce

Please sign in to comment.