Class: NattyUI::Margin

Inherits:
Element show all
Defined in:
lib/natty-ui/margin.rb

Overview

An Element that adds horizontal indentation and vertical spacing.

Instances are created by Features#margin.

All Features methods are available on this element.

Examples:

Horizontal indent via block

ui.margin 0, 4 do
  ui.puts 'This line is indented by 4 characters on each side.'
end

Manual close with left spacing

m = ui.margin left: 2
ui.puts 'Indented content.'
m.end