Module: ActsAsInterface::ClassMethods
- Defined in:
- lib/acts_as_interface.rb
Instance Method Summary collapse
Instance Method Details
#abstract_methods(*args) ⇒ Object
65 66 67 68 69 70 71 72 73 74 |
# File 'lib/acts_as_interface.rb', line 65 def abstract_methods(*args) = args. args.each do |abstract_method_name| if [:for] == :class (class << self; self; end).define_abstract_method(abstract_method_name, ) else define_abstract_method(abstract_method_name, ) end end end |
#callbacks(*args) ⇒ Object
76 77 78 79 80 |
# File 'lib/acts_as_interface.rb', line 76 def callbacks(*args) = args. = {:default => nil}.merge() abstract_methods(*args.push()) end |