Module: Assertion::Attributes
Overview
Module Attributes provides features to define and store a list of attributes shared by the [Assertion::Base] and [Assertion::Guard] classes
Instance Method Summary collapse
-
#attribute(*names) ⇒ undefined
Adds a new attribute or a list of attributes to the class.
-
#attributes ⇒ Array<Symbol>
List of attributes, defined for the class.
Instance Method Details
#attribute(*names) ⇒ undefined
Adds a new attribute or a list of attributes to the class
29 30 31 32 |
# File 'lib/assertion/attributes.rb', line 29 def attribute(*names) @attributes = List[:symbolize][attributes + names] __check_attributes__ end |
#attributes ⇒ Array<Symbol>
List of attributes, defined for the class
14 15 16 |
# File 'lib/assertion/attributes.rb', line 14 def attributes @attributes ||= [] end |