Class: Adhearsion::URIList

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/adhearsion/uri_list.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*list) ⇒ URIList

Returns a new instance of URIList


9
10
11
# File 'lib/adhearsion/uri_list.rb', line 9

def initialize(*list)
  super list.flatten
end

Class Method Details

.import(string) ⇒ Object


5
6
7
# File 'lib/adhearsion/uri_list.rb', line 5

def self.import(string)
  new string.strip.split("\n").map(&:strip)
end

Instance Method Details

#==(other) ⇒ Object


17
18
19
# File 'lib/adhearsion/uri_list.rb', line 17

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

#to_sObject


13
14
15
# File 'lib/adhearsion/uri_list.rb', line 13

def to_s
  join("\n")
end