Class: RareMap::Column
- Inherits:
-
Object
- Object
- RareMap::Column
- Defined in:
- lib/rare_map/schema_parser.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#references ⇒ Object
Returns the value of attribute references.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#unique ⇒ Object
Returns the value of attribute unique.
Instance Method Summary collapse
- #foreign_key? ⇒ Boolean
-
#initialize(name, type) ⇒ Column
constructor
A new instance of Column.
- #unique? ⇒ Boolean
Constructor Details
#initialize(name, type) ⇒ Column
Returns a new instance of Column.
86 87 88 89 90 |
# File 'lib/rare_map/schema_parser.rb', line 86 def initialize(name, type) @name = name @type = type @unique = false end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
83 84 85 |
# File 'lib/rare_map/schema_parser.rb', line 83 def name @name end |
#references ⇒ Object
Returns the value of attribute references.
84 85 86 |
# File 'lib/rare_map/schema_parser.rb', line 84 def references @references end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
83 84 85 |
# File 'lib/rare_map/schema_parser.rb', line 83 def type @type end |
#unique ⇒ Object
Returns the value of attribute unique.
84 85 86 |
# File 'lib/rare_map/schema_parser.rb', line 84 def unique @unique end |
Instance Method Details
#foreign_key? ⇒ Boolean
96 97 98 |
# File 'lib/rare_map/schema_parser.rb', line 96 def foreign_key? @references ? true : false end |
#unique? ⇒ Boolean
92 93 94 |
# File 'lib/rare_map/schema_parser.rb', line 92 def unique? @unique end |