Class: NattyUI::Attributes::Base

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

Instance Method Summary collapse

Instance Method Details

#merge(**attributes) ⇒ Attributes

Returns updated copy of itself.

Returns:



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.

Returns:



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

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