Class: Cassandra::Types::UserDefined::Field

Inherits:
Object
  • Object
show all
Defined in:
lib/cassandra/types.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#nameString (readonly)

Returns name of this field.

Returns:

  • (String)

    name of this field



996
997
998
# File 'lib/cassandra/types.rb', line 996

def name
  @name
end

#typeCassandra::Type (readonly)

Returns type of this field.

Returns:



998
999
1000
# File 'lib/cassandra/types.rb', line 998

def type
  @type
end

Instance Method Details

#eql?(other) ⇒ Boolean Also known as: ==

Returns:



1012
1013
1014
1015
1016
# File 'lib/cassandra/types.rb', line 1012

def eql?(other)
  other.is_a?(Field) &&
    @name == other.name &&
    @type == other.type
end

#to_sString

String representation of the field

Returns:

  • (String)

    String representation of the field



1008
1009
1010
# File 'lib/cassandra/types.rb', line 1008

def to_s
  "#{@name} #{@type}"
end