Sha256: bddc06097d3952e39a2c9fa6154b6f67a98cb3bc04f340bcb36bac2b3d006fda

Contents?: true

Size: 459 Bytes

Versions: 3

Compression:

Stored size: 459 Bytes

Contents

# frozen_string_literal: true

require 'active_support/core_ext/object/blank'

module Middleman
  module Robots
    module Generators
      class SitemapUri
        attr_accessor :uri

        def initialize(uri)
          @uri = uri
        end

        def text
          return nil if uri.blank?
          raise ArgumentError, 'sitemap_uri must be string or nil' unless uri.is_a? String

          "Sitemap: #{uri}"
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
middleman-robots-1.3.7 lib/middleman-robots/generators/sitemap_uri.rb
middleman-robots-1.3.6 lib/middleman-robots/generators/sitemap_uri.rb
middleman-robots-1.3.5 lib/middleman-robots/generators/sitemap_uri.rb