Class: ImdbCelebrity::Parser::NokogiriParser::CelebrityBioParser

Inherits:
NokogiriParser
  • Object
show all
Includes:
Parser
Defined in:
lib/imdb_celebrity/parser/nokogiri_parser/celebrity_bio_parser.rb

Instance Method Summary collapse

Methods included from Parser

#height, #name, #nationality, #real_name

Constructor Details

#initialize(uri) ⇒ CelebrityBioParser

Returns a new instance of CelebrityBioParser.



11
12
13
# File 'lib/imdb_celebrity/parser/nokogiri_parser/celebrity_bio_parser.rb', line 11

def initialize uri
  super uri
end

Instance Method Details

#biographyObject



15
16
17
# File 'lib/imdb_celebrity/parser/nokogiri_parser/celebrity_bio_parser.rb', line 15

def biography
  document.at("h5[text()*='Biography']").next_sibling.next_sibling.inner_text rescue nil
end