Module: Jaso::Attributable::ClassMethods

Defined in:
lib/jaso/attributable.rb

Instance Method Summary collapse

Instance Method Details

#__attributesObject



10
11
12
# File 'lib/jaso/attributable.rb', line 10

def __attributes
  @__attributes ||= {}
end

#attribute(name, **options) ⇒ Object



14
15
16
17
# File 'lib/jaso/attributable.rb', line 14

def attribute(name, **options)
  __attributes[name] = options
  private define_method(name) { __attributes[name] }
end