Class: TimeBuffer::ApplicationHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/time_buffer/application_handler.rb

Instance Method Summary collapse

Constructor Details

#initialize(app_data) ⇒ ApplicationHandler

Returns a new instance of ApplicationHandler.

[View source]

5
6
7
# File 'lib/time_buffer/application_handler.rb', line 5

def initialize(app_data)
  @app_data = app_data
end

Instance Method Details

#insert_applicationObject

[View source]

9
10
11
12
13
14
# File 'lib/time_buffer/application_handler.rb', line 9

def insert_application
  TimeBuffer::DatabaseConnector.new.execute(
    "INSERT OR IGNORE INTO applications (bundle_id, app_name) VALUES (?, ?)",
    [app_data.bundle_id, app_data.name]
  )
end