Class: Humble::SessionFactory

Inherits:
Object
  • Object
show all
Defined in:
lib/humble/session_factory.rb

Instance Method Summary collapse

Constructor Details

#initialize(configuration) ⇒ SessionFactory

Returns a new instance of SessionFactory.



3
4
5
# File 'lib/humble/session_factory.rb', line 3

def initialize(configuration)
  @configuration = configuration
end

Instance Method Details

#create_connectionObject



11
12
13
# File 'lib/humble/session_factory.rb', line 11

def create_connection
  Sequel.connect(@configuration.connection_string)
end

#create_sessionObject



7
8
9
# File 'lib/humble/session_factory.rb', line 7

def create_session
  Session.new(self, @configuration)
end