Class: RFacebook::FacepricotChain

Inherits:
String
  • Object
show all
Includes:
FacepricotChaining
Defined in:
lib/facepricot.rb

Instance Method Summary collapse

Constructor Details

#initialize(hpricotDoc) ⇒ FacepricotChain

Returns a new instance of FacepricotChain.



119
120
121
122
# File 'lib/facepricot.rb', line 119

def initialize(hpricotDoc)
  super(hpricotDoc.inner_html.gsub("&", "&"))
  @doc = hpricotDoc
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(methodSymbol, *params) ⇒ Object



124
125
126
# File 'lib/facepricot.rb', line 124

def method_missing(methodSymbol, *params)
  return make_facepricot_chain(methodSymbol.to_s, @doc)
end

Instance Method Details

#get(key) ⇒ Object



128
129
130
# File 'lib/facepricot.rb', line 128

def get(key)
  return make_facepricot_chain(key.to_s, @doc)
end