Module: NattyUI::Attributes::Width

Included in:
Table::Cell::Attributes, Table::Column
Defined in:
lib/natty-ui/attributes.rb

Instance Attribute Summary collapse

Instance Attribute Details

#max_widthInteger?

Maximum element width.

Returns:

  • (Integer, nil)


145
146
147
# File 'lib/natty-ui/attributes.rb', line 145

def max_width
  width.is_a?(Range) ? @width.end : @width
end

#min_widthInteger?

Minimum element width.

Returns:

  • (Integer, nil)


132
133
134
# File 'lib/natty-ui/attributes.rb', line 132

def min_width
  width.is_a?(Range) ? @width.begin : @width
end

#widthInteger, ...

Element width.

Returns:

  • (Integer)

    dedicated element width

  • (Range)

    width range: #min_width..#max_width

  • (nil)

    when unassigned



121
122
123
# File 'lib/natty-ui/attributes.rb', line 121

def width
  @width
end