Class: Hanami::View::Rendering::NullLocal
- Inherits:
- Utils::BasicObject
- Defined in:
- lib/hanami/view/rendering/null_local.rb
Overview
Null local
Constant Summary collapse
- TO_STR =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
"".freeze
Instance Method Summary collapse
- #all? ⇒ Boolean private
- #any? ⇒ Boolean private
- #empty? ⇒ Boolean private
-
#initialize(local) ⇒ NullLocal
constructor
private
A new instance of NullLocal.
- #method_missing(m) ⇒ Object private
- #nil? ⇒ Boolean private
- #to_str ⇒ Object (also: #to_s) private
Constructor Details
#initialize(local) ⇒ NullLocal
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 NullLocal.
18 19 20 |
# File 'lib/hanami/view/rendering/null_local.rb', line 18 def initialize(local) @local = local end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(m) ⇒ 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.
58 59 60 61 62 63 64 |
# File 'lib/hanami/view/rendering/null_local.rb', line 58 def method_missing(m, *) if m.match(/\?\z/) false else self.class.new("#{ @local }.#{ m }") end end |
Instance Method Details
#all? ⇒ Boolean
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.
24 25 26 |
# File 'lib/hanami/view/rendering/null_local.rb', line 24 def all? false end |
#any? ⇒ Boolean
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.
30 31 32 |
# File 'lib/hanami/view/rendering/null_local.rb', line 30 def any? false end |
#empty? ⇒ Boolean
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.
36 37 38 |
# File 'lib/hanami/view/rendering/null_local.rb', line 36 def empty? true end |
#nil? ⇒ Boolean
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.
42 43 44 |
# File 'lib/hanami/view/rendering/null_local.rb', line 42 def nil? true end |
#to_str ⇒ Object Also known as: to_s
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.
48 49 50 |
# File 'lib/hanami/view/rendering/null_local.rb', line 48 def to_str TO_STR end |