Method: Brief::Document#extract_content
- Defined in:
- lib/brief/document.rb
#extract_content(*args) ⇒ Object
64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/brief/document.rb', line 64 def extract_content(*args) = args. args = .delete(:args) if .is_a?(Hash) && .key?(:args) case when .empty? && args.length == 1 && args.first.is_a?(String) results = css(args.first) results = results.first if results.length > 1 && args.first.match(/:first-of-type/) results.try(:text).to_s else binding.pry end end |