Class: Switchman::ActiveRecord::AttributeMethods::ClassMethods::CodeGenerator

Inherits:
Object
  • Object
show all
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

Constructor Details

#initialize(mod, line) ⇒ CodeGenerator

Returns a new instance of CodeGenerator.



83
84
85
86
# File 'lib/switchman/active_record/attribute_methods.rb', line 83

def initialize(mod, line)
  @module = mod
  @line = line
end

Instance Method Details

#<<(string) ⇒ Object



88
89
90
# File 'lib/switchman/active_record/attribute_methods.rb', line 88

def <<(string)
  @module.module_eval(string, __FILE__, @line)
end