Sha256: a690aef6ee2659472ece35beef89cfb1da21e66635bf8a2bdc251505b1b7bc26

Contents?: true

Size: 329 Bytes

Versions: 3

Compression:

Stored size: 329 Bytes

Contents

# encoding: utf-8

module Adhearsion
  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

3 entries across 3 versions & 1 rubygems

Version Path
adhearsion-3.0.0.rc1 lib/adhearsion/uri_list.rb
adhearsion-3.0.0.beta2 lib/adhearsion/uri_list.rb
adhearsion-3.0.0.beta1 lib/adhearsion/uri_list.rb