Class: CassSchema::Cluster
- Inherits:
-
Struct
- Object
- Struct
- CassSchema::Cluster
- Defined in:
- lib/cass_schema/cluster.rb
Overview
A struct representing a Cassandra cluster.
Instance Attribute Summary collapse
-
#connection ⇒ Object
Returns the value of attribute connection.
Class Method Summary collapse
Instance Attribute Details
#connection ⇒ Object
Returns the value of attribute connection
6 7 8 |
# File 'lib/cass_schema/cluster.rb', line 6 def connection @connection end |
Class Method Details
.build(hash) ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/cass_schema/cluster.rb', line 7 def self.build(hash) l = hash.with_indifferent_access if l[:hosts] l[:connection] ||= Cassandra.cluster(hosts: l[:hosts], port: l[:port]) end new(l[:connection]) end |