Sha256: e11c0b110bd5cf584690d19547c8723f365ceb27e83933791f0f5d375e3213c0
Contents?: true
Size: 609 Bytes
Versions: 17
Compression:
Stored size: 609 Bytes
Contents
# frozen_string_literal: true module OoxmlParser # Class for parsing `w:instrText` object class InstructionText < TextValue # @return [Boolean] is current object for hyperlink def hyperlink? value.include?('HYPERLINK') end # @return [Boolean] is current object for page number def page_number? value.match?(/PAGE\s+\\\*/) end # @return [Hyperlink] convert InstructionText to Hyperlink def to_hyperlink Hyperlink.new(value.sub('HYPERLINK ', '').split(' \\o ').first, value.sub('HYPERLINK', '').split(' \\o ').last) end end end
Version data entries
17 entries across 17 versions & 1 rubygems