Class: Desktop::OSX::Database

Inherits:
Object
  • Object
show all
Defined in:
lib/desktop/osx/database.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(connection = nil) ⇒ Database

Returns a new instance of Database.



8
9
10
# File 'lib/desktop/osx/database.rb', line 8

def initialize(connection = nil)
  @connection = connection || default_connection
end

Instance Attribute Details

#connectionObject (readonly)

Returns the value of attribute connection.



6
7
8
# File 'lib/desktop/osx/database.rb', line 6

def connection
  @connection
end

Instance Method Details

#clear_desktop_imageObject



12
13
14
# File 'lib/desktop/osx/database.rb', line 12

def clear_desktop_image
  clear_data if data?
end

#closeObject



16
17
18
# File 'lib/desktop/osx/database.rb', line 16

def close
  connection.close
end