Module: Outil
- Defined in:
- lib/outil.rb,
lib/outil/ocs.rb,
lib/outil/version.rb,
lib/outil/ocs/index.rb,
lib/outil/workspace.rb,
lib/outil/decorators.rb,
lib/outil/ocs/config.rb,
lib/outil/ocs/parser.rb,
lib/outil/ocs/serialize.rb
Defined Under Namespace
Modules: Decorators, Inferace, OCS Classes: Workspace
Constant Summary collapse
- VERSION =
"0.1"
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/outil.rb', line 27 def self.included(base) # Add the decorator class-method logic to the includer # E.G. The client has control over the "use" and "named" # class-level directives. base.extend(Inferace) # By default, only the Registration decorator # is added, and it's added under the generic :outil namespace base.class_eval do use Decorators::Register named :outil end # Pull all the AST's in the user index # and define them as methods of the Bucket # module just before the inclusion is done. Workspace.ocs.index.all.each do |ast| Outil.module_eval <<-RUBY_EVAL #{Unparser.unparse(ast)} RUBY_EVAL end end |