Class: Nanoc::Core::View
- Inherits:
-
Object
- Object
- Nanoc::Core::View
- Includes:
- ContractsSupport
- Defined in:
- lib/nanoc/core/view.rb
Direct Known Subclasses
BasicItemRepCollectionView, BasicItemRepView, BasicItemView, ConfigView, IdentifiableCollectionView, LayoutView
Instance Method Summary collapse
- #_context ⇒ Object private
- #_unwrap ⇒ Object private
-
#frozen? ⇒ Boolean
True if the wrapped object is frozen; false otherwise.
-
#initialize(context) ⇒ View
constructor
A new instance of View.
- #inspect ⇒ Object
Methods included from ContractsSupport
enabled?, included, setup_once, warn_about_performance
Constructor Details
#initialize(context) ⇒ View
Returns a new instance of View.
15 16 17 |
# File 'lib/nanoc/core/view.rb', line 15 def initialize(context) @context = context end |
Instance Method Details
#_context ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
20 21 22 |
# File 'lib/nanoc/core/view.rb', line 20 def _context @context end |
#_unwrap ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
25 26 27 |
# File 'lib/nanoc/core/view.rb', line 25 def _unwrap raise NotImplementedError end |
#frozen? ⇒ Boolean
True if the wrapped object is frozen; false otherwise.
34 35 36 |
# File 'lib/nanoc/core/view.rb', line 34 def frozen? _unwrap.frozen? end |
#inspect ⇒ Object
38 39 40 |
# File 'lib/nanoc/core/view.rb', line 38 def inspect "<#{self.class}>" end |