Class: RedshiftExtractor::Drop
- Inherits:
-
Object
- Object
- RedshiftExtractor::Drop
- Defined in:
- lib/redshift_extractor/drop.rb
Instance Attribute Summary collapse
-
#table_name ⇒ Object
readonly
Returns the value of attribute table_name.
Instance Method Summary collapse
- #drop_sql ⇒ Object
-
#initialize(args) ⇒ Drop
constructor
A new instance of Drop.
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_name ⇒ Object (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_sql ⇒ Object
9 10 11 |
# File 'lib/redshift_extractor/drop.rb', line 9 def drop_sql "drop table if exists #{table_name};" end |