Class: RedshiftExtractor::Drop

Inherits:
Object
  • Object
show all
Defined in:
lib/redshift_extractor/drop.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ Drop

Returns a new instance of Drop.



5
6
7
# File 'lib/redshift_extractor/drop.rb', line 5

def initialize(args)
  @table_name = args.fetch(:table_name)
end

Instance Attribute Details

#table_nameObject (readonly)

Returns the value of attribute table_name.



3
4
5
# File 'lib/redshift_extractor/drop.rb', line 3

def table_name
  @table_name
end

Instance Method Details

#drop_sqlObject



9
10
11
# File 'lib/redshift_extractor/drop.rb', line 9

def drop_sql
  "drop table if exists #{table_name};"
end