Class: Desktop::OSX::Database
- Inherits:
-
Object
- Object
- Desktop::OSX::Database
- Defined in:
- lib/desktop/osx/database.rb
Instance Attribute Summary collapse
-
#connection ⇒ Object
readonly
Returns the value of attribute connection.
Instance Method Summary collapse
- #clear_desktop_image ⇒ Object
- #close ⇒ Object
-
#initialize(connection = nil) ⇒ Database
constructor
A new instance of Database.
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
#connection ⇒ Object (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_image ⇒ Object
12 13 14 |
# File 'lib/desktop/osx/database.rb', line 12 def clear_desktop_image clear_data if data? end |
#close ⇒ Object
16 17 18 |
# File 'lib/desktop/osx/database.rb', line 16 def close connection.close end |