Class: Rail::Context
- Inherits:
-
Object
- Object
- Rail::Context
- Defined in:
- lib/rail/context.rb
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Context
constructor
A new instance of Context.
Constructor Details
#initialize(options = {}) ⇒ Context
Returns a new instance of Context.
3 4 5 6 7 8 9 10 |
# File 'lib/rail/context.rb', line 3 def initialize( = {}) ([:mixins] || []).each { |mixin| extend(mixin) } singleton_class.class_eval do ([:locals] || {}).each do |name, value| define_method(name) { value } end end end |