Class: Datory::Attributes::Options::Base
- Inherits:
-
Object
- Object
- Datory::Attributes::Options::Base
- Defined in:
- lib/datory/attributes/options/base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#consists_of ⇒ Object
readonly
Returns the value of attribute consists_of.
-
#format ⇒ Object
readonly
Returns the value of attribute format.
-
#max ⇒ Object
readonly
Returns the value of attribute max.
-
#min ⇒ Object
readonly
Returns the value of attribute min.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #info ⇒ Object
-
#initialize(name:, type:, consists_of:, min:, max:, format:) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(name:, type:, consists_of:, min:, max:, format:) ⇒ Base
Returns a new instance of Base.
9 10 11 12 13 14 15 16 |
# File 'lib/datory/attributes/options/base.rb', line 9 def initialize(name:, type:, consists_of:, min:, max:, format:) @name = name @type = type @consists_of = consists_of @min = min @max = max @format = format end |
Instance Attribute Details
#consists_of ⇒ Object (readonly)
Returns the value of attribute consists_of.
7 8 9 |
# File 'lib/datory/attributes/options/base.rb', line 7 def consists_of @consists_of end |
#format ⇒ Object (readonly)
Returns the value of attribute format.
7 8 9 |
# File 'lib/datory/attributes/options/base.rb', line 7 def format @format end |
#max ⇒ Object (readonly)
Returns the value of attribute max.
7 8 9 |
# File 'lib/datory/attributes/options/base.rb', line 7 def max @max end |
#min ⇒ Object (readonly)
Returns the value of attribute min.
7 8 9 |
# File 'lib/datory/attributes/options/base.rb', line 7 def min @min end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'lib/datory/attributes/options/base.rb', line 7 def name @name end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
7 8 9 |
# File 'lib/datory/attributes/options/base.rb', line 7 def type @type end |
Instance Method Details
#info ⇒ Object
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/datory/attributes/options/base.rb', line 18 def info { name:, type:, min:, max:, consists_of:, format: } end |