Module: CurrentInstance
- Defined in:
- lib/current_instance.rb,
lib/current_instance/base.rb,
lib/current_instance/version.rb,
lib/current_instance/class_methods.rb
Overview
end
Defined Under Namespace
Modules: ClassMethods
Constant Summary collapse
- VERSION =
"0.0.2"
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
2 3 4 5 6 7 8 9 10 |
# File 'lib/current_instance/base.rb', line 2 def self.included(base) base.class_eval %q{ @@current_name = "current_#{base.name.downcase}".to_sym cattr_accessor :current_name @@current_name_id = "#\{@@current_name\}_id".to_sym cattr_accessor :current_name_id } base.extend(ClassMethods) end |