Class: BazaMigrations::Commands::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/baza_migrations/commands/base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#dbObject

Returns the value of attribute db.



2
3
4
# File 'lib/baza_migrations/commands/base.rb', line 2

def db
  @db
end

#tableObject

Returns the value of attribute table.



2
3
4
# File 'lib/baza_migrations/commands/base.rb', line 2

def table
  @table
end

Instance Method Details

#default_args(args = {}) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/baza_migrations/commands/base.rb', line 4

def default_args(args = {})
  return_args = {null: true}
  return_args[:null] = args[:null] if args.include?(:null)
  return_args[:default] = args[:default] if args.include?(:default)

  return_args
end