Class: Objectmancy::AttributeOptions
- Inherits:
-
Object
- Object
- Objectmancy::AttributeOptions
- Defined in:
- lib/objectmancy/attribute_options.rb
Overview
Class to contain the options for attribute definitions. Makes accessing them more Object-Oriented. This could be written with Objectable, but that felt a little too on-the-nose.
Instance Attribute Summary collapse
-
#multiple ⇒ Object
readonly
Returns the value of attribute multiple.
- #objectable ⇒ Object readonly
- #type ⇒ Object readonly
Instance Method Summary collapse
-
#initialize(**options) ⇒ AttributeOptions
constructor
A new instance of AttributeOptions.
Constructor Details
#initialize(**options) ⇒ AttributeOptions
Returns a new instance of AttributeOptions.
12 13 14 15 16 |
# File 'lib/objectmancy/attribute_options.rb', line 12 def initialize(**) @type = [:type] @objectable = [:objectable] @multiple = [:multiple] end |
Instance Attribute Details
#multiple ⇒ Object (readonly)
Returns the value of attribute multiple.
10 |
# File 'lib/objectmancy/attribute_options.rb', line 10 attr_reader :type, :objectable, :multiple |
#objectable ⇒ Object (readonly)
10 |
# File 'lib/objectmancy/attribute_options.rb', line 10 attr_reader :type, :objectable, :multiple |
#type ⇒ Object (readonly)
10 11 12 |
# File 'lib/objectmancy/attribute_options.rb', line 10 def type @type end |