Class: Nanoc::View

Inherits:
Object
  • Object
show all
Defined in:
lib/nanoc/base/views/view.rb

Instance Method Summary collapse

Constructor Details

#initialize(context) ⇒ View

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.

Returns a new instance of View.



4
5
6
# File 'lib/nanoc/base/views/view.rb', line 4

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.



9
10
11
# File 'lib/nanoc/base/views/view.rb', line 9

def _context
  @context
end

#frozen?Boolean

True if the wrapped object is frozen; false otherwise.

Returns:

  • (Boolean)

See Also:

  • Object#frozen?


23
24
25
# File 'lib/nanoc/base/views/view.rb', line 23

def frozen?
  unwrap.frozen?
end

#inspectObject



27
28
29
# File 'lib/nanoc/base/views/view.rb', line 27

def inspect
  "<#{self.class}>"
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)


14
15
16
# File 'lib/nanoc/base/views/view.rb', line 14

def unwrap
  raise NotImplementedError
end