Class: GoogleText::Parsers::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/google_text/parsers/base.rb

Direct Known Subclasses

Dashboard, Inbox, Login

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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

#stringObject

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