class BigShift::CreateTableCommand
Public Class Methods
new(schema)
click to toggle source
# File lib/big_shift/commands/create_table_command.rb, line 3 def initialize(schema) @schema = schema end
Public Instance Methods
body()
click to toggle source
# File lib/big_shift/commands/create_table_command.rb, line 15 def body { 'tableReference' => { 'projectId' => project_id, 'datasetId' => dataset_id, 'tableId' => @schema.table_name, }, 'schema' => @schema, } end
endpoint()
click to toggle source
# File lib/big_shift/commands/create_table_command.rb, line 11 def endpoint 'tables' end
on_execute()
click to toggle source
# File lib/big_shift/commands/create_table_command.rb, line 7 def on_execute CreateTableResponse.new post end