Module: Vedeu::Views::Value::InstanceMethods Private
- Includes:
- Common
- Defined in:
- lib/vedeu/views/value.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Provide additional behaviour as instance methods to the including class or module.
Instance Attribute Summary collapse
-
#client ⇒ void
The client binding represents the client application object that is currently invoking a DSL method.
- #parent ⇒ void
Instance Method Summary collapse
-
#add(child) ⇒ Vedeu::Views
(also: #<<)
private
Adds the child to the collection.
- #client? ⇒ Boolean private
- #collection ⇒ void private
-
#deputy ⇒ void
private
Returns a DSL instance responsible for defining the DSL methods of this model.
- #entity ⇒ void private
- #value ⇒ void private
- #value=(value) ⇒ void private
-
#value? ⇒ Boolean
private
Returns a boolean indicating whether this model has a non-empty value.
Methods included from Common
#absent?, #array?, #boolean, #boolean?, #empty_value?, #escape?, #falsy?, #hash?, #line_model?, #numeric?, #positionable?, #present?, #snake_case, #stream_model?, #string?, #symbol?, #truthy?, #view_model?
Instance Attribute Details
#client ⇒ void
This method returns an undefined value.
The client binding represents the client application object that is currently invoking a DSL method. It is required so that we can send messages to the client application object should we need to.
70 71 72 |
# File 'lib/vedeu/views/value.rb', line 70 def client @client end |
#parent ⇒ void
This method returns an undefined value.
74 75 76 |
# File 'lib/vedeu/views/value.rb', line 74 def parent @parent end |
Instance Method Details
#add(child) ⇒ Vedeu::Views Also known as: <<
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.
Adds the child to the collection.
80 81 82 |
# File 'lib/vedeu/views/value.rb', line 80 def add(child) @value = value.add(child) end |
#client? ⇒ 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.
86 87 88 |
# File 'lib/vedeu/views/value.rb', line 86 def client? present?(client) end |
#collection ⇒ void
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.
This method returns an undefined value.
91 92 93 |
# File 'lib/vedeu/views/value.rb', line 91 def collection self.class.collection_klass end |
#deputy ⇒ void
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.
This method returns an undefined value.
Returns a DSL instance responsible for defining the DSL methods of this model.
99 100 101 |
# File 'lib/vedeu/views/value.rb', line 99 def deputy self.class.deputy_klass.new(self, client) end |
#entity ⇒ void
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.
This method returns an undefined value.
104 105 106 |
# File 'lib/vedeu/views/value.rb', line 104 def entity self.class.entity_klass end |
#value ⇒ void
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.
This method returns an undefined value.
109 110 111 |
# File 'lib/vedeu/views/value.rb', line 109 def value collection.coerce(@value || [], self) end |
#value=(value) ⇒ void
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.
This method returns an undefined value.
115 116 117 |
# File 'lib/vedeu/views/value.rb', line 115 def value=(value) @value = collection.coerce(value, self) end |
#value? ⇒ 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.
Returns a boolean indicating whether this model has a non-empty value.
123 124 125 |
# File 'lib/vedeu/views/value.rb', line 123 def value? value.any? end |