Class: Odin::Types::UniqueConstraint
- Inherits:
-
Object
- Object
- Odin::Types::UniqueConstraint
- Defined in:
- lib/odin/types/schema.rb
Instance Attribute Summary collapse
-
#field_name ⇒ Object
readonly
Returns the value of attribute field_name.
-
#kind ⇒ Object
readonly
Returns the value of attribute kind.
Instance Method Summary collapse
-
#initialize(field_name: nil) ⇒ UniqueConstraint
constructor
A new instance of UniqueConstraint.
Constructor Details
#initialize(field_name: nil) ⇒ UniqueConstraint
Returns a new instance of UniqueConstraint.
113 114 115 116 117 |
# File 'lib/odin/types/schema.rb', line 113 def initialize(field_name: nil) @kind = :unique @field_name = field_name&.freeze freeze end |
Instance Attribute Details
#field_name ⇒ Object (readonly)
Returns the value of attribute field_name.
111 112 113 |
# File 'lib/odin/types/schema.rb', line 111 def field_name @field_name end |
#kind ⇒ Object (readonly)
Returns the value of attribute kind.
111 112 113 |
# File 'lib/odin/types/schema.rb', line 111 def kind @kind end |