Class: Lotus::Views::NullView Private

Inherits:
Object
  • Object
show all
Defined in:
lib/lotus/views/null_view.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Null Object pattern for views

Since:

  • 0.1.0

Instance Method Summary collapse

Constructor Details

#initialize(body) ⇒ NullView

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 NullView.

Since:

  • 0.1.0



8
9
10
# File 'lib/lotus/views/null_view.rb', line 8

def initialize(body)
  @body = body
end

Instance Method Details

#render(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.

Since:

  • 0.1.0



12
13
14
# File 'lib/lotus/views/null_view.rb', line 12

def render(context)
  @body
end