Module: Vedeu::Views::DefaultAttributes Private
- Includes:
- Repositories::Defaults
- Defined in:
- lib/vedeu/views/default_attributes.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.
Provides the default attributes for variaus Vedeu::Views models.
Instance Attribute Summary collapse
- #align ⇒ Vedeu::Coercers::Alignment readonly private
- #pad ⇒ String readonly private
- #truncate ⇒ Boolean (also: #truncate?) readonly private
- #width ⇒ Fixnum|NilClass readonly private
- #wordwrap ⇒ Boolean (also: #wordwrap?) readonly private
Instance Method Summary collapse
-
#absent?(variable) ⇒ Boolean
included
from Common
private
Returns a boolean indicating whether a variable is nil or empty.
- #attributes ⇒ Hash<Symbol => void> private
-
#become(klass, attributes) ⇒ Class
included
from Common
private
Converts one class into another.
-
#boolean(value) ⇒ Boolean
included
from Common
private
Returns a boolean indicating the value was a boolean.
-
#boolean?(value) ⇒ Boolean
included
from Common
private
Returns a boolean indicating whether the value is a Boolean.
-
#defaults ⇒ Hash<Symbol => Array<void>|NilClass>
private
private
The default values for a new instance of this class.
-
#escape?(value) ⇒ Boolean
included
from Common
private
Returns a boolean indicating whether the value is an escape sequence object (e.g. Cells::Escape.).
-
#falsy?(value) ⇒ Boolean
included
from Common
private
Returns a boolean indicating whether the value should be considered false.
-
#hash?(value) ⇒ Boolean
included
from Common
private
Returns a boolean indicating whether the value is a Hash.
-
#initialize(attributes = {}) ⇒ void
included
from Repositories::Defaults
private
Returns a new instance of the class including this module.
-
#line_model? ⇒ Boolean
included
from Common
private
Returns a boolean indicating the model is a Line.
-
#numeric?(value) ⇒ Boolean
included
from Common
private
Returns a boolean indicating whether the value is a Fixnum.
-
#present?(variable) ⇒ Boolean
included
from Common
private
Returns a boolean indicating whether a variable has a useful value.
-
#snake_case(klass) ⇒ String
included
from Common
private
Converts a class name to a lowercase snake case string.
-
#stream_model? ⇒ Boolean
included
from Common
private
Returns a boolean indicating the model is a Stream.
-
#string?(value) ⇒ Boolean
included
from Common
private
Returns a boolean indicating whether the value is a Fixnum.
-
#truthy?(value) ⇒ Boolean
included
from Common
private
Returns a boolean indicating whether the value should be considered true.
- #validate(attributes) ⇒ Hash included from Repositories::Defaults private private
-
#view_model? ⇒ Boolean
included
from Common
private
Returns a boolean indicating the model is a View.
Instance Attribute Details
#align ⇒ Vedeu::Coercers::Alignment (readonly)
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.
17 18 19 |
# File 'lib/vedeu/views/default_attributes.rb', line 17 def align @align end |
#pad ⇒ String (readonly)
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.
21 22 23 |
# File 'lib/vedeu/views/default_attributes.rb', line 21 def pad @pad end |
#truncate ⇒ Boolean (readonly) Also known as: truncate?
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.
25 26 27 |
# File 'lib/vedeu/views/default_attributes.rb', line 25 def truncate @truncate end |
#width ⇒ Fixnum|NilClass (readonly)
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/vedeu/views/default_attributes.rb', line 30 def width @width end |
#wordwrap ⇒ Boolean (readonly) Also known as: wordwrap?
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.
34 35 36 |
# File 'lib/vedeu/views/default_attributes.rb', line 34 def wordwrap @wordwrap end |
Instance Method Details
#absent?(variable) ⇒ Boolean Originally defined in module Common
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 a variable is nil or empty.
#attributes ⇒ Hash<Symbol => 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.
38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/vedeu/views/default_attributes.rb', line 38 def attributes { align: align, client: client, colour: colour, name: name, pad: pad, parent: parent, style: style, truncate: truncate, width: width, wordwrap: wordwrap, } end |
#become(klass, attributes) ⇒ Class Originally defined in module Common
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.
Converts one class into another.
#boolean(value) ⇒ Boolean Originally defined in module Common
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 the value was a boolean.
#boolean?(value) ⇒ Boolean Originally defined in module Common
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 the value is a Boolean.
#defaults ⇒ Hash<Symbol => Array<void>|NilClass> (private)
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.
The default values for a new instance of this class.
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/vedeu/views/default_attributes.rb', line 58 def defaults { align: nil, client: nil, colour: nil, name: nil, pad: ' ', parent: nil, style: nil, truncate: false, value: '', width: nil, wordwrap: false, } end |
#escape?(value) ⇒ Boolean Originally defined in module Common
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 the value is an escape sequence object (e.g. Vedeu::Cells::Escape.)
#falsy?(value) ⇒ Boolean Originally defined in module Common
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 the value should be considered false.
#hash?(value) ⇒ Boolean Originally defined in module Common
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 the value is a Hash.
#initialize(attributes = {}) ⇒ void Originally defined in module Repositories::Defaults
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.
If a particular key is missing from the attributes parameter, then it is added with the respective value from #defaults.
Returns a new instance of the class including this module.
#line_model? ⇒ Boolean Originally defined in module Common
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 the model is a Views::Line.
#numeric?(value) ⇒ Boolean Originally defined in module Common
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 the value is a Fixnum.
#present?(variable) ⇒ Boolean Originally defined in module Common
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 a variable has a useful value.
#snake_case(klass) ⇒ String Originally defined in module Common
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.
Converts a class name to a lowercase snake case string.
#stream_model? ⇒ Boolean Originally defined in module Common
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 the model is a Views::Stream.
#string?(value) ⇒ Boolean Originally defined in module Common
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 the value is a Fixnum.
#truthy?(value) ⇒ Boolean Originally defined in module Common
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 the value should be considered true.
#validate(attributes) ⇒ Hash (private) Originally defined in module Repositories::Defaults
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.
#view_model? ⇒ Boolean Originally defined in module Common
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 the model is a Views::View.