Module: ToyModel
- Defined in:
- lib/toy-model.rb,
lib/toy-model/railtie.rb,
lib/toy-model/version.rb,
lib/toy-model/attribute_wrapper.rb,
lib/toy-model/attribute_observer.rb,
lib/toy-model/attributes_collection.rb
Defined Under Namespace
Modules: Attributes Classes: AttributeObserver, AttributeWrapper, AttributesCollection, Engine
Constant Summary collapse
- VERSION =
"0.0.1"
Class Method Summary collapse
Class Method Details
.load!(dir_path) ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/toy-model/railtie.rb', line 3 def self.load! dir_path ActiveRecord::Base.extend ToyModel::Attributes Dir[dir_path].each do |file| require file ToyModel::AttributeObserver.new file.split('/').last.split('.').first.classify.constantize end end |