Class: NattyUI::Attributes::Base
- Inherits:
-
Object
- Object
- NattyUI::Attributes::Base
- Defined in:
- lib/natty-ui/attributes.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#merge(**attributes) ⇒ Attributes
Updated copy of itself.
-
#merge!(**attributes) ⇒ Attributes
Itself.
Instance Method Details
#merge(**attributes) ⇒ Attributes
Returns updated copy of itself.
9 10 11 |
# File 'lib/natty-ui/attributes.rb', line 9 def merge(**attributes) attributes.empty? ? dup : dup._assign(attributes) end |
#merge!(**attributes) ⇒ Attributes
Returns itself.
14 |
# File 'lib/natty-ui/attributes.rb', line 14 def merge!(**attributes) = attributes.empty? ? self : _assign(attributes) |