Method: OpenGraphReader::Parser::Graph#fetch
- Defined in:
- lib/open_graph_reader/parser/graph.rb
#fetch(property, default = nil) { ... } ⇒ String, ...
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Fetch first node’s value.
124 125 126 127 128 129 |
# File 'lib/open_graph_reader/parser/graph.rb', line 124 def fetch property, default = nil node = find_by(property) return yield if node.nil? && block_given? return default if node.nil? node.content end |