Class: Ashikawa::Core::KeyOptions
- Inherits:
-
Object
- Object
- Ashikawa::Core::KeyOptions
- Defined in:
- lib/ashikawa-core/key_options.rb
Overview
Options for controlling keys of a collection
Instance Attribute Summary collapse
-
#allow_user_keys ⇒ Object
readonly
Is the user allowed to set keys by him- or herself?.
-
#increment ⇒ Object
readonly
Size of increment steps.
-
#offset ⇒ Object
readonly
A specific start value.
-
#type ⇒ Object
readonly
Either traditional or autoincrement.
Instance Method Summary collapse
-
#initialize(raw_key_options) ⇒ KeyOptions
constructor
Create a new KeyOptions object from the raw key options.
Constructor Details
#initialize(raw_key_options) ⇒ KeyOptions
Create a new KeyOptions object from the raw key options
48 49 50 51 52 53 |
# File 'lib/ashikawa-core/key_options.rb', line 48 def initialize() @type = ['type'] @offset = ['offset'] @increment = ['increment'] @allow_user_keys = ['allowUserKeys'] end |
Instance Attribute Details
#allow_user_keys ⇒ Object (readonly)
Is the user allowed to set keys by him- or herself?
40 41 42 |
# File 'lib/ashikawa-core/key_options.rb', line 40 def allow_user_keys @allow_user_keys end |
#increment ⇒ Object (readonly)
Size of increment steps
31 32 33 |
# File 'lib/ashikawa-core/key_options.rb', line 31 def increment @increment end |
#offset ⇒ Object (readonly)
A specific start value
22 23 24 |
# File 'lib/ashikawa-core/key_options.rb', line 22 def offset @offset end |
#type ⇒ Object (readonly)
Either traditional or autoincrement
13 14 15 |
# File 'lib/ashikawa-core/key_options.rb', line 13 def type @type end |