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.
1095 1096 1097 1098 |
# File 'lib/teradata-cli/connection.rb', line 1095 def initialize(, value) = @value = value end |
Instance Attribute Details
#value ⇒ Object (readonly) Also known as: data
Returns the value of attribute value.
1100 1101 1102 |
# File 'lib/teradata-cli/connection.rb', line 1100 def value @value end |
Instance Method Details
#null? ⇒ Boolean
1116 1117 1118 |
# File 'lib/teradata-cli/connection.rb', line 1116 def null? @value.nil? end |
#to_s ⇒ Object
1120 1121 1122 |
# File 'lib/teradata-cli/connection.rb', line 1120 def to_s "(#{name} #{@value.inspect})" end |
#type ⇒ Object
1108 1109 1110 |
# File 'lib/teradata-cli/connection.rb', line 1108 def type .type_name end |
#type_code ⇒ Object
1112 1113 1114 |
# File 'lib/teradata-cli/connection.rb', line 1112 def type_code .type_code end |