Sha256: a1f2dfb718a50e917f9dc2fb0eb2231934aa28fec159d6b2355d26c067eab95d

Contents?: true

Size: 330 Bytes

Versions: 6

Compression:

Stored size: 330 Bytes

Contents

# frozen_string_literal: true

module RelatonIec
  # Hit.
  class Hit < RelatonBib::Hit
    attr_writer :fetch

    # Parse page.
    # @return [RelatonIec::IecBibliographicItem]
    def fetch
      @fetch ||= Scrapper.parse_page @hit
    end

    def part
      @part ||= hit[:code].match(/(?<=-)[\w-]+/)&.to_s
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
relaton-iec-1.14.1 lib/relaton_iec/hit.rb
relaton-iec-1.14.0 lib/relaton_iec/hit.rb
relaton-iec-1.13.0 lib/relaton_iec/hit.rb
relaton-iec-1.12.0 lib/relaton_iec/hit.rb
relaton-iec-1.11.4 lib/relaton_iec/hit.rb
relaton-iec-1.11.3 lib/relaton_iec/hit.rb