Sha256: c17d4370e2f7addd9af6039c80bb206347fe76c9f6b22be31cccadedc62217c5
Contents?: true
Size: 384 Bytes
Versions: 21
Compression:
Stored size: 384 Bytes
Contents
class Dataset::Adaptors::Iqvoc::LabelAdaptor < Dataset::Adaptors::Iqvoc::HTTPAdaptor def find(concept_url) path = URI.parse(concept_url).path if response = http_get(path) extract_label(response.body) end end def extract_label(html) doc = Nokogiri::HTML(html) node = doc.at_css('h1') node.at_css('small').remove node.text.try(:strip) end end
Version data entries
21 entries across 21 versions & 1 rubygems
Version | Path |
---|---|
iqvoc-4.3.0 | app/models/dataset/adaptors/iqvoc/label_adaptor.rb |