./ruby/test/mydelegatetest.rb

download original
class ArrayView

  includeDelegationTo Array

  def initialize(array)
    @model = array
  end


  def printView
    print ">>> VIEW:\n  "
    @model.each {|elem| print "#{elem} "}
    print "\n"
  end

  def get_delegate
    @model
  end

end

  
back to test

(C) 1998-2017 Olaf Klischat <olaf.klischat@gmail.com>