Object
# File lib/inline_acceleration.rb, line 37 def lazy_attr_reader(name, &block) attr_name = name.to_s.gsub('?', '') define_method("lazy_attr_initialization_#{attr_name}".to_sym, block) class_eval def #{name.to_s} @#{attr_name} = lazy_attr_initialization_#{attr_name} if @#{attr_name}.nil? @#{attr_name} end end
Generated with the Darkfish Rdoc Generator 2.