Class: NoSE::Fields::IDField
Overview
Field holding a unique identifier
Direct Known Subclasses
Constant Summary
Constants inherited from Field
Instance Attribute Summary
Attributes inherited from Field
#name, #parent, #primary_key, #size
Class Method Summary collapse
-
.value_from_string(string) ⇒ String
Return the String parameter as-is.
Instance Method Summary collapse
-
#initialize(name, **options) ⇒ IDField
constructor
A new instance of IDField.
-
#random_value ⇒ nil
nil value which is interpreted by the backend as requesting a new ID.
Methods inherited from Field
#*, #==, #cardinality, #hash, #id, #to_color, #to_s
Methods included from Supertype
Constructor Details
#initialize(name, **options) ⇒ IDField
Returns a new instance of IDField.
255 256 257 258 |
# File 'lib/nose/model/fields.rb', line 255 def initialize(name, **) super(name, 16, **) @primary_key = true end |
Class Method Details
.value_from_string(string) ⇒ String
Return the String parameter as-is
262 263 264 |
# File 'lib/nose/model/fields.rb', line 262 def self.value_from_string(string) string end |
Instance Method Details
#random_value ⇒ nil
nil value which is interpreted by the backend as requesting a new ID
268 269 270 |
# File 'lib/nose/model/fields.rb', line 268 def random_value nil end |