+(other)
click to toggle source
def +(other)
ary = other.is_a?(self.class) ? other.internal_array : other
self.class.new(@array + ary)
end
[](i)
click to toggle source
each() { |item| ... }
click to toggle source
def each
@array.each{ |item| yield item }
end
first()
click to toggle source
def first
@array.first
end
include?(char)
click to toggle source
def include?(char)
any? { |e| e.include?(char) }
end
last()
click to toggle source
length()
click to toggle source
def length
@array.length
end
match(char)
click to toggle source
def match(char)
to_regexp.match(char)
end
to_regexp(anchored = false)
click to toggle source
def to_regexp(anchored = false)
re = to_s(true)
re = "\\A#{re}\\Z" if anchored
Regexp.compile(re, flags)
end