Class: SilkLayout::Layout::InlineFormatter::Fragment

Inherits:
Struct
  • Object
show all
Defined in:
lib/silk_layout/layout/inline_formatter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#boxObject

Returns the value of attribute box

Returns:

  • (Object)

    the current value of box



6
7
8
# File 'lib/silk_layout/layout/inline_formatter.rb', line 6

def box
  @box
end

#break_afterObject

Returns the value of attribute break_after

Returns:

  • (Object)

    the current value of break_after



6
7
8
# File 'lib/silk_layout/layout/inline_formatter.rb', line 6

def break_after
  @break_after
end

#heightObject

Returns the value of attribute height

Returns:

  • (Object)

    the current value of height



6
7
8
# File 'lib/silk_layout/layout/inline_formatter.rb', line 6

def height
  @height
end

#textObject

Returns the value of attribute text

Returns:

  • (Object)

    the current value of text



6
7
8
# File 'lib/silk_layout/layout/inline_formatter.rb', line 6

def text
  @text
end

#widthObject

Returns the value of attribute width

Returns:

  • (Object)

    the current value of width



6
7
8
# File 'lib/silk_layout/layout/inline_formatter.rb', line 6

def width
  @width
end

Instance Method Details

#whitespace?Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/silk_layout/layout/inline_formatter.rb', line 7

def whitespace?
  text&.match?(/\A\s+\z/)
end