class Rubyfocus::SearchableArray
A sample class, SearchableArray
, is basically a wrapper around a standard array
Attributes
array[R]
Public Class Methods
new(*args, &blck)
click to toggle source
Takes the same arguments as the array it wraps
# File lib/rubyfocus/includes/searchable.rb, line 70 def initialize(*args, &blck) @array = Array.new(*args, &blck) end
Public Instance Methods
method_missing(meth, *args, &blck)
click to toggle source
In all other respects, it's an array - handily governed by this method
Calls superclass method
# File lib/rubyfocus/includes/searchable.rb, line 75 def method_missing meth, *args, &blck if @array.respond_to?(meth) @array.send(meth, *args, &blck) else super(meth, *args, &blck) end end