Class: PgGraph::Type::Field
- Defined in:
- lib/pg_graph/type/type.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #identifier ⇒ Object
-
#initialize(composite_type, name, type) ⇒ Field
constructor
A new instance of Field.
- #schema_identifier ⇒ Object
Methods inherited from Node
#dump, #guid, #inspect, #inspect_inner
Constructor Details
#initialize(composite_type, name, type) ⇒ Field
Returns a new instance of Field.
415 416 417 418 419 420 |
# File 'lib/pg_graph/type/type.rb', line 415 def initialize(composite_type, name, type) constrain composite_type, CompositeType, NilClass self.class < TableObject or !type.is_a?(TableObject) or raise "Illegal field type" super(composite_type, name) @type = type end |
Instance Attribute Details
#type ⇒ Object (readonly)
Returns the value of attribute type.
413 414 415 |
# File 'lib/pg_graph/type/type.rb', line 413 def type @type end |
Instance Method Details
#identifier ⇒ Object
422 |
# File 'lib/pg_graph/type/type.rb', line 422 def identifier() name end |
#schema_identifier ⇒ Object
424 425 426 |
# File 'lib/pg_graph/type/type.rb', line 424 def schema_identifier composite_type.schema_identifier + '.' + identifier end |