Class: Cassie::Schema::StructureLoader Deprecated

Inherits:
Object
  • Object
show all
Defined in:
lib/cassie/schema/structure_loader.rb

Overview

Deprecated.

Use SchemaLoader instead

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(opts = {}) ⇒ StructureLoader

Returns a new instance of StructureLoader.



8
9
10
# File 'lib/cassie/schema/structure_loader.rb', line 8

def initialize(opts={})
  @source_path = opts[:source_path] || default_source_path
end

Instance Attribute Details

#source_pathObject (readonly)

Returns the value of attribute source_path.



5
6
7
# File 'lib/cassie/schema/structure_loader.rb', line 5

def source_path
  @source_path
end

Instance Method Details

#loadObject



12
13
14
15
16
17
18
# File 'lib/cassie/schema/structure_loader.rb', line 12

def load
  args = ["-f", source_path]
  runner = Cassie::Support::SystemCommand.new("cqlsh", args)

  runner.run
  raise runner.failure_message unless runner.success?
end