Class: Houston::Extensions::Views
- Inherits:
-
Object
- Object
- Houston::Extensions::Views
- Defined in:
- lib/houston/boot/extensions/view.rb
Instance Method Summary collapse
- #[](view) ⇒ Object
-
#initialize ⇒ Views
constructor
A new instance of Views.
- #reset! ⇒ Object
Constructor Details
#initialize ⇒ Views
Returns a new instance of Views.
7 8 9 10 11 |
# File 'lib/houston/boot/extensions/view.rb', line 7 def initialize @views = Concurrent::Hash.new do |hash, key| hash[key] = Houston::Extensions::View.new end end |
Instance Method Details
#[](view) ⇒ Object
13 14 15 |
# File 'lib/houston/boot/extensions/view.rb', line 13 def [](view) @views[view] end |
#reset! ⇒ Object
17 18 19 |
# File 'lib/houston/boot/extensions/view.rb', line 17 def reset! @views.values.each(&:reset!) end |