Class: GoogleText::Parsers::Base
- Inherits:
-
Object
- Object
- GoogleText::Parsers::Base
- Defined in:
- lib/google_text/parsers/base.rb
Instance Attribute Summary collapse
-
#string ⇒ Object
Returns the value of attribute string.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(string) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(string) ⇒ Base
Returns a new instance of Base.
14 15 16 17 |
# File 'lib/google_text/parsers/base.rb', line 14 def initialize(string) @string = string process end |
Instance Attribute Details
#string ⇒ Object
Returns the value of attribute string.
4 5 6 |
# File 'lib/google_text/parsers/base.rb', line 4 def string @string end |
Class Method Details
.selectors_for(symbol_or_hash) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/google_text/parsers/base.rb', line 6 def self.selectors_for(symbol_or_hash) if symbol_or_hash.respond_to?(:keys) @selectors = symbol_or_hash else @selectors[symbol_or_hash] end end |