Sha256: 5efb62cd292fbd727f696963521ecb4cd45bdc9d3f581462a0559dd3e8db24b9

Contents?: true

Size: 352 Bytes

Versions: 2

Compression:

Stored size: 352 Bytes

Contents

# frozen_string_literal: true

require 'link_thumbnailer/model'

module LinkThumbnailer
  module Models
    class Title < ::LinkThumbnailer::Model

      attr_reader :node, :text

      def initialize(node, text = nil)
        @node = node
        @text = sanitize(text || node.text)
      end

      def to_s
        text
      end

    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
link_thumbnailer-3.4.0 lib/link_thumbnailer/models/title.rb
link_thumbnailer-3.3.2 lib/link_thumbnailer/models/title.rb