class TinyDyno::Fields::RangeKey
Attributes
default_val[RW]
Defines the behaviour for defined fields in the document. Set readers for the instance variables.
label[RW]
Defines the behaviour for defined fields in the document. Set readers for the instance variables.
name[RW]
Defines the behaviour for defined fields in the document. Set readers for the instance variables.
options[RW]
Defines the behaviour for defined fields in the document. Set readers for the instance variables.
Public Class Methods
new(name, options = {})
click to toggle source
Create the new field with a name and optional additional options.
@example Create the new field.
Field.new(:name, :type => String)
@param [ Hash ] options The field options.
@option options [ Class ] :type The class of the field. @option options [ Object ] :default The default value for the field. @option options [ String ] :label The field's label.
@since 3.0.0
# File lib/tiny_dyno/fields/range_key.rb, line 21 def initialize(name, options = {}) @name = name @options = options.merge(range_key: true) @label = options[:label] @default_val = options[:default] @type = options[:type] end