Sha256: 6035c29e29722756fbb9c9041ed48143e90efbc56dda634b6e410d8837f05941

Contents?: true

Size: 275 Bytes

Versions: 1

Compression:

Stored size: 275 Bytes

Contents

require File.expand_path('../../lib/after_do', __FILE__)

class Dog
  def bark
    puts 'Woooof'
  end

  def eat
    puts 'yummie!'
  end
end

Dog.extend AfterDo
Dog.after :bark do puts 'I just heard a dog bark!' end

dog = Dog.new
dog2 = Dog.new

dog.bark
dog.eat
dog2.bark

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
after_do-0.1.0 samples/dog.rb