Class: WhosDatedWho::Parser
- Inherits:
-
Object
- Object
- WhosDatedWho::Parser
- Defined in:
- lib/whos_dated_who/parser.rb
Instance Attribute Summary collapse
-
#doc ⇒ Object
readonly
Returns the value of attribute doc.
Instance Method Summary collapse
Instance Attribute Details
#doc ⇒ Object (readonly)
Returns the value of attribute doc.
3 4 5 |
# File 'lib/whos_dated_who/parser.rb', line 3 def doc @doc end |
Instance Method Details
#parse(body) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/whos_dated_who/parser.rb', line 5 def parse(body) @doc = Nokogiri::HTML(body) extract_bio extract_current_relationship # TODO: extract_past_relationships @result end |
#result ⇒ Object
13 14 15 |
# File 'lib/whos_dated_who/parser.rb', line 13 def result @result ||= Hashie::Mash.new(biography: @biography, status: :unknown) end |