Class: Cassandra::Types::UserDefined::Field
- Inherits:
-
Object
- Object
- Cassandra::Types::UserDefined::Field
- Defined in:
- lib/cassandra/types.rb
Instance Attribute Summary collapse
-
#name ⇒ String
readonly
Name of this field.
-
#type ⇒ Cassandra::Type
readonly
Type of this field.
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean (also: #==)
- #hash ⇒ Object
-
#to_s ⇒ String
String representation of the field.
Instance Attribute Details
#name ⇒ String (readonly)
1172 1173 1174 |
# File 'lib/cassandra/types.rb', line 1172 def name @name end |
#type ⇒ Cassandra::Type (readonly)
1174 1175 1176 |
# File 'lib/cassandra/types.rb', line 1174 def type @type end |
Instance Method Details
#eql?(other) ⇒ Boolean Also known as: ==
1197 1198 1199 1200 1201 |
# File 'lib/cassandra/types.rb', line 1197 def eql?(other) other.is_a?(Field) && @name == other.name && @type == other.type end |
#hash ⇒ Object
1188 1189 1190 1191 1192 1193 1194 1195 |
# File 'lib/cassandra/types.rb', line 1188 def hash @hash ||= begin h = 17 h = 31 * h + @name.hash h = 31 * h + @type.hash h end end |
#to_s ⇒ String
String representation of the field
1184 1185 1186 |
# File 'lib/cassandra/types.rb', line 1184 def to_s "#{@name} #{@type}" end |