some docs

This commit is contained in:
Torsten Ruger
2016-12-06 11:38:09 +02:00
parent 229f5896c6
commit 4b05b48197
17 changed files with 71 additions and 101 deletions

View File

@ -1,13 +1,10 @@
# Behaviour is something that has methods, basically class and modules superclass
# described in the ruby language book as the eigenclass, what you get with
# class MyClass
# class << self <--- this is called the eigenclass, or metaclass, and really is just
# .... the class object but gives us the ability to use the
# syntax as if it were a class
#
# instance_methods is the attribute in the including class that has the methods
module Parfait
module Behaviour
# when included we set up the instance_methods attribute
def self.included(base)
base.attribute :instance_methods
end
@ -22,6 +19,7 @@ module Parfait
return m if m
self.instance_methods = List.new
end
def method_names
names = List.new
self.methods.each do |method|