class RubyDictionary::Klass
Attributes
definition[RW]
method[RW]
name[RW]
url[RW]
Public Class Methods
all()
click to toggle source
# File lib/ruby_dictionary/klass.rb, line 25 def self.all @@all end
list()
click to toggle source
# File lib/ruby_dictionary/klass.rb, line 29 def self.list @@all.each{|k| k.name} end
new(name=nil,definition=nil,url=nil)
click to toggle source
# File lib/ruby_dictionary/klass.rb, line 6 def initialize(name=nil,definition=nil,url=nil) @name = name @definition = definition @url = url @klass_methods = [] @inst_methods = [] @all_methods = [] end
Public Instance Methods
add_inst_method(method)
click to toggle source
# File lib/ruby_dictionary/klass.rb, line 15 def add_inst_method(method) method.klass = self unless method.klass != nil @inst_methods << method unless @inst_methods.include?(method) end
add_klass_method(method)
click to toggle source
# File lib/ruby_dictionary/klass.rb, line 20 def add_klass_method(method) method.klass = self unless method.klass != nil @klass_methods << method unless @klass_methods.include?(method) end
all_methods()
click to toggle source
# File lib/ruby_dictionary/klass.rb, line 41 def all_methods @all_methods end
clear_method_lists()
click to toggle source
# File lib/ruby_dictionary/klass.rb, line 57 def clear_method_lists @inst_methods.clear @klass_methods.clear @all_methods.clear end
inst_methods()
click to toggle source
# File lib/ruby_dictionary/klass.rb, line 33 def inst_methods @inst_methods end
klass_methods()
click to toggle source
# File lib/ruby_dictionary/klass.rb, line 37 def klass_methods @klass_methods end
list_all_methods()
click to toggle source
# File lib/ruby_dictionary/klass.rb, line 53 def list_all_methods @all_methods.each{|m| puts m.name} end
list_inst_methods()
click to toggle source
# File lib/ruby_dictionary/klass.rb, line 45 def list_inst_methods @inst_methods.each{|m| puts m.name} end
list_klass_methods()
click to toggle source
# File lib/ruby_dictionary/klass.rb, line 49 def list_klass_methods @klass_methods.each{|m| puts m.name} end