Module: Eigindir::API
- Included in:
- Eigindir
- Defined in:
- lib/eigindir/api.rb
Overview
The module provides class-level API
Instance Method Summary collapse
-
#attribute(name, coerce: nil, reader: nil, writer: nil, strict: nil) ⇒ undefined
Declares the attribute.
-
#attribute_reader(name, coerce: nil, strict: nil) ⇒ undefined
Declares the attribute getter.
-
#attribute_writer(name, coerce: nil, strict: nil) ⇒ undefined
Declares the attribute writer.
Instance Method Details
#attribute(name, coerce: nil, reader: nil, writer: nil, strict: nil) ⇒ undefined
Declares the attribute
20 21 22 23 |
# File 'lib/eigindir/api.rb', line 20 def attribute(name, coerce: nil, reader: nil, writer: nil, strict: nil) attribute_reader name, coerce: (reader || coerce), strict: strict attribute_writer name, coerce: (writer || coerce), strict: strict end |