Class: Switchman::ActiveRecord::AttributeMethods::ClassMethods::CodeGenerator
- Inherits:
-
Object
- Object
- Switchman::ActiveRecord::AttributeMethods::ClassMethods::CodeGenerator
- Defined in:
- lib/switchman/active_record/attribute_methods.rb
Overview
just a dummy class with the proper interface that calls module_eval immediately
Instance Method Summary collapse
- #<<(string) ⇒ Object
-
#initialize(mod, line) ⇒ CodeGenerator
constructor
A new instance of CodeGenerator.
Constructor Details
#initialize(mod, line) ⇒ CodeGenerator
Returns a new instance of CodeGenerator.
89 90 91 92 |
# File 'lib/switchman/active_record/attribute_methods.rb', line 89 def initialize(mod, line) @module = mod @line = line end |
Instance Method Details
#<<(string) ⇒ Object
94 95 96 |
# File 'lib/switchman/active_record/attribute_methods.rb', line 94 def <<(string) @module.module_eval(string, __FILE__, @line) end |