Class: Nanoc::Core::View

Inherits:
Object
  • Object
show all
Includes:
ContractsSupport
Defined in:
lib/nanoc/core/view.rb

Instance Method Summary collapse

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

#_contextObject

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

#_unwrapObject

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.

Raises:

  • (NotImplementedError)


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.

Returns:

  • (Boolean)

See Also:

  • Object#frozen?


34
35
36
# File 'lib/nanoc/core/view.rb', line 34

def frozen?
  _unwrap.frozen?
end

#inspectObject



38
39
40
# File 'lib/nanoc/core/view.rb', line 38

def inspect
  "<#{self.class}>"
end