Class: NattyUI::Attributes
- Inherits:
-
Object
- Object
- NattyUI::Attributes
- Defined in:
- lib/natty-ui/attributes.rb
Direct Known Subclasses
Defined Under Namespace
Modules: Align, Border, BorderStyle, Height, Margin, Padding, Position, Style, Vertical, Width
Instance Method Summary collapse
-
#merge(**attributes) ⇒ Attributes
Updated copy of itself.
-
#merge!(**attributes) ⇒ Attributes
(also: #assign)
Itself.
Instance Method Details
#merge(**attributes) ⇒ Attributes
Returns updated copy of itself.
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.
13 |
# File 'lib/natty-ui/attributes.rb', line 13 def merge!(**attributes) = attributes.empty? ? self : _assign(attributes) |