Class: SensitiveWordFilter::Load
- Inherits:
-
Object
- Object
- SensitiveWordFilter::Load
- Defined in:
- lib/sensitive_word_filter/load.rb
Instance Attribute Summary collapse
-
#file_paths ⇒ Object
readonly
Returns the value of attribute file_paths.
-
#words ⇒ Object
Returns the value of attribute words.
Instance Method Summary collapse
-
#initialize(file_paths) ⇒ Load
constructor
A new instance of Load.
- #load ⇒ Object
Constructor Details
#initialize(file_paths) ⇒ Load
Returns a new instance of Load.
6 7 8 9 |
# File 'lib/sensitive_word_filter/load.rb', line 6 def initialize(file_paths) @file_paths = file_paths @words = Array.new end |
Instance Attribute Details
#file_paths ⇒ Object (readonly)
Returns the value of attribute file_paths.
4 5 6 |
# File 'lib/sensitive_word_filter/load.rb', line 4 def file_paths @file_paths end |
#words ⇒ Object
Returns the value of attribute words.
3 4 5 |
# File 'lib/sensitive_word_filter/load.rb', line 3 def words @words end |
Instance Method Details
#load ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/sensitive_word_filter/load.rb', line 11 def load if file_paths.is_a?(Array) file_paths.each do |file_path| _load(file_path) end else _load(file_paths) end words end |