Class: ChangeDatabase

Inherits:
Struct
  • Object
show all
Defined in:
lib/engine/app/lib/commands/change_database.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#backendObject

Returns the value of attribute backend

Returns:

  • (Object)

    the current value of backend



1
2
3
# File 'lib/engine/app/lib/commands/change_database.rb', line 1

def backend
  @backend
end

#databaseObject

Returns the value of attribute database

Returns:

  • (Object)

    the current value of database



1
2
3
# File 'lib/engine/app/lib/commands/change_database.rb', line 1

def database
  @database
end

#sessionObject

Returns the value of attribute session

Returns:

  • (Object)

    the current value of session



1
2
3
# File 'lib/engine/app/lib/commands/change_database.rb', line 1

def session
  @session
end

Instance Method Details

#executeObject



2
3
4
5
# File 'lib/engine/app/lib/commands/change_database.rb', line 2

def execute
  backend.current_database = database
  session[:database] = database
end