Module: Vedeu::Views::DefaultAttributes Private

Includes:
Repositories::Defaults
Included in:
Line, Stream
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

Instance Method Summary collapse

Methods included from Repositories::Defaults

#initialize, #validate

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

#alignVedeu::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

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

Returns:

  • (String)


21
22
23
# File 'lib/vedeu/views/default_attributes.rb', line 21

def pad
  @pad
end

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

Returns:



25
26
27
# File 'lib/vedeu/views/default_attributes.rb', line 25

def truncate
  @truncate
end

#widthFixnum|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.

Returns:

  • (Fixnum|NilClass)


30
31
32
# File 'lib/vedeu/views/default_attributes.rb', line 30

def width
  @width
end

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

Returns:



34
35
36
# File 'lib/vedeu/views/default_attributes.rb', line 34

def wordwrap
  @wordwrap
end

Instance Method Details

#attributesHash<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.

Returns:

  • (Hash<Symbol => void>)


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

#defaultsHash<Symbol => void> (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 options/attributes for a new instance of this class.

Returns:

  • (Hash<Symbol => void>)


56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# File 'lib/vedeu/views/default_attributes.rb', line 56

def defaults
  {
    align:    nil,
    client:   nil,
    colour:   nil,
    name:     nil,
    pad:      ' ',
    parent:   nil,
    style:    nil,
    truncate: false,
    value:    '',
    width:    nil,
    wordwrap: true,
  }
end