Sha256: 9c972a286384cadda54affade0c0dab5d57e1aa0cb8ce48f1af77eb495e777d5

Contents?: true

Size: 329 Bytes

Versions: 24

Compression:

Stored size: 329 Bytes

Contents

# encoding: utf-8

module Punchblock
  class URIList < SimpleDelegator
    def self.import(string)
      new string.strip.split("\n").map(&:strip)
    end

    def initialize(*list)
      super list.flatten
    end

    def to_s
      join("\n")
    end

    def ==(other)
      self.__getobj__ == other.to_ary
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
punchblock-2.7.5 lib/punchblock/uri_list.rb
punchblock-2.7.3 lib/punchblock/uri_list.rb
punchblock-2.7.2 lib/punchblock/uri_list.rb
punchblock-2.7.1 lib/punchblock/uri_list.rb
punchblock-2.7.0 lib/punchblock/uri_list.rb
punchblock-2.6.0 lib/punchblock/uri_list.rb
punchblock-2.5.3 lib/punchblock/uri_list.rb
punchblock-2.5.2 lib/punchblock/uri_list.rb
punchblock-2.5.1 lib/punchblock/uri_list.rb
punchblock-2.5.0 lib/punchblock/uri_list.rb
punchblock-2.4.2 lib/punchblock/uri_list.rb
punchblock-2.4.0 lib/punchblock/uri_list.rb
punchblock-2.3.1 lib/punchblock/uri_list.rb
punchblock-2.3.0 lib/punchblock/uri_list.rb
punchblock-2.2.2 lib/punchblock/uri_list.rb
punchblock-2.2.1 lib/punchblock/uri_list.rb
punchblock-2.2.0 lib/punchblock/uri_list.rb
punchblock-2.1.1 lib/punchblock/uri_list.rb
punchblock-2.1.0 lib/punchblock/uri_list.rb
punchblock-2.0.2 lib/punchblock/uri_list.rb