Module: Smelter::Extendable
- Defined in:
- lib/smelter/extendable.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
-
.included(base) ⇒ Object
Extendable classes must support the following methods def self.find_each I.e.
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
Extendable classes must support the following methods def self.find_each
I.e. as with an ActiveRecord model
end
def id
returns the id of the script
end
def source
returns the source file for the script
end
17 18 19 20 21 22 23 |
# File 'lib/smelter/extendable.rb', line 17 def self.included(base) Smelter::DefinitionProxy.extension_class = base base.class_eval do extend ClassMethods end end |
Instance Method Details
#register ⇒ Object
25 26 27 |
# File 'lib/smelter/extendable.rb', line 25 def register instance_eval source, id, 1 end |