Method: Hb::Base.attribute

Defined in:
lib/hb.rb

.attribute(attr, options = {}) ⇒ Object



25
26
27
28
29
# File 'lib/hb.rb', line 25

def attribute(attr, options = {})
  key = options.fetch(:key, attr)
  # https://apidock.com/rails/Class/class_attribute
  self._attributes_data = _attributes_data.merge({ key => attr })
end