Class: Bubble::KeywordsMaker::Blacklist
- Inherits:
-
Object
- Object
- Bubble::KeywordsMaker::Blacklist
- Includes:
- Singleton
- Defined in:
- lib/bubble/keywords_maker/blacklist.rb
Instance Attribute Summary collapse
-
#locate ⇒ Object
Returns the value of attribute locate.
-
#words ⇒ Object
Returns the value of attribute words.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Blacklist
constructor
A new instance of Blacklist.
Constructor Details
#initialize ⇒ Blacklist
Returns a new instance of Blacklist.
31 32 33 34 |
# File 'lib/bubble/keywords_maker/blacklist.rb', line 31 def initialize self.words = [] self.locate = Bubble::KeywordsMaker::Default::PtBr end |
Instance Attribute Details
#locate ⇒ Object
Returns the value of attribute locate.
8 9 10 |
# File 'lib/bubble/keywords_maker/blacklist.rb', line 8 def locate @locate end |
#words ⇒ Object
Returns the value of attribute words.
8 9 10 |
# File 'lib/bubble/keywords_maker/blacklist.rb', line 8 def words @words end |
Class Method Details
.locate=(locate) ⇒ Object
27 28 29 |
# File 'lib/bubble/keywords_maker/blacklist.rb', line 27 def self.locate=(locate) instance.locate = locate end |
.regexp ⇒ Object
23 24 25 |
# File 'lib/bubble/keywords_maker/blacklist.rb', line 23 def self.regexp %r(^(#{words.join('|')})$) end |
.words ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/bubble/keywords_maker/blacklist.rb', line 14 def self.words black = %w([a-z] [0-9]+) black << Bubble::KeywordsMaker::Blacklist.instance.locate::Blacklist black << Bubble::KeywordsMaker::Blacklist.instance.words black.flatten end |
.words=(array) ⇒ Object
10 11 12 |
# File 'lib/bubble/keywords_maker/blacklist.rb', line 10 def self.words=(array) instance.words = array end |