Sha256: 3d7a502f481ff72f763f348c877812cfe6881aa1d20d2349391d0f6e0aeca50c

Contents?: true

Size: 336 Bytes

Versions: 3

Compression:

Stored size: 336 Bytes

Contents

module Iowa
  # Monkey see, Monkey do.
  #
  # That is, use this class to deal with @ usage in templates that doesn't match any existing method.
  #
  class Monkey
    def initialize(val = '')
      @val = val
    end

    def method_missing(meth)
      Monkey.new("#{@val}.#{meth}")
    end

    def to_s
      @val
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
IOWA-1.0.3 src/iowa/Monkey.rb
IOWA-1.0.2 src/iowa/Monkey.rb
IOWA-1.0.0 src/iowa/Monkey.rb