Class: NattyUI::Attributes

Inherits:
Object
  • Object
show all
Defined in:
lib/natty-ui/attributes.rb

Defined Under Namespace

Modules: Align, Border, BorderStyle, Height, Margin, Padding, Position, Style, Vertical, Width

Instance Method Summary collapse

Instance Method Details

#merge(**attributes) ⇒ Attributes

Returns updated copy of itself.

Returns:



8
9
10
# File 'lib/natty-ui/attributes.rb', line 8

def merge(**attributes)
  attributes.empty? ? dup : dup._assign(attributes)
end

#merge!(**attributes) ⇒ Attributes Also known as: assign

Returns itself.

Returns:



13
# File 'lib/natty-ui/attributes.rb', line 13

def merge!(**attributes) = attributes.empty? ? self : _assign(attributes)