Module: Ogpr
- Defined in:
- lib/ogpr.rb,
lib/ogpr/loader.rb,
lib/ogpr/parser.rb,
lib/ogpr/result.rb,
lib/ogpr/fetcher.rb,
lib/ogpr/version.rb,
lib/ogpr/model/base.rb,
lib/ogpr/model/open_graph.rb,
lib/ogpr/model/twitter_card.rb,
lib/ogpr/fetcher/html_fetcher.rb
Defined Under Namespace
Modules: Model Classes: Fetcher, Loader, Parser, Result
Constant Summary collapse
- VERSION =
'1.1.0'
Class Method Summary collapse
-
.fetch(url) ⇒ Ogpr::Result
Fetch the url and parse meta data.
-
.load(hash) ⇒ Ogpr::Result
Load the hash object.
-
.parse(str) ⇒ Ogpr::Result
Parse the string.
Class Method Details
.fetch(url) ⇒ Ogpr::Result
Fetch the url and parse meta data.
14 15 16 17 |
# File 'lib/ogpr.rb', line 14 def fetch(url) result = Fetcher.fetch(url) Parser.parse(result.to_s) end |
.load(hash) ⇒ Ogpr::Result
Load the hash object
23 24 25 |
# File 'lib/ogpr.rb', line 23 def load(hash) Loader.load(hash) end |
.parse(str) ⇒ Ogpr::Result
Parse the string
31 32 33 |
# File 'lib/ogpr.rb', line 31 def parse(str) Parser.parse(str) end |