Class: TeradataCli::Field
- Inherits:
-
Object
- Object
- TeradataCli::Field
- Extended by:
- Forwardable
- Defined in:
- lib/teradata-cli/connection.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
(also: #data)
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(metadata, value) ⇒ Field
constructor
A new instance of Field.
- #null? ⇒ Boolean
- #to_s ⇒ Object
- #type ⇒ Object
- #type_code ⇒ Object
Constructor Details
#initialize(metadata, value) ⇒ Field
Returns a new instance of Field.
1104 1105 1106 1107 |
# File 'lib/teradata-cli/connection.rb', line 1104 def initialize(, value) @metadata = @value = value end |
Instance Attribute Details
#value ⇒ Object (readonly) Also known as: data
Returns the value of attribute value.
1109 1110 1111 |
# File 'lib/teradata-cli/connection.rb', line 1109 def value @value end |
Instance Method Details
#null? ⇒ Boolean
1125 1126 1127 |
# File 'lib/teradata-cli/connection.rb', line 1125 def null? @value.nil? end |
#to_s ⇒ Object
1129 1130 1131 |
# File 'lib/teradata-cli/connection.rb', line 1129 def to_s "(#{name} #{@value.inspect})" end |
#type ⇒ Object
1117 1118 1119 |
# File 'lib/teradata-cli/connection.rb', line 1117 def type @metadata.type_name end |
#type_code ⇒ Object
1121 1122 1123 |
# File 'lib/teradata-cli/connection.rb', line 1121 def type_code @metadata.type_code end |