Class: Toolhound::Job

Inherits:
Base
  • Object
show all
Defined in:
lib/toolhound-ruby/job.rb

Overview

Class to parse GitHub repository owner and name from URLs and to generate URLs

Constant Summary

Constants inherited from Base

Base::DATE_TIME_FORMAT, Base::DB_TYPE_REGEX

Instance Attribute Summary

Attributes inherited from Base

#connection

Instance Method Summary collapse

Methods inherited from Base

#_build_joins, #_build_selects, #_build_where, #all, #build_and_query, #build_joins, #build_selects, #build_sql, #build_where, #default_wheres, #find, #formatted_table_and_column, #formatted_table_name, #formmatted_column_name, #get_operator, #initialize, #locale, #merge_options, #parse_time, primary_key, #primary_key, primary_key=, #procedure, #query, rename_attributes, renamed_attributes, #table_name, table_name, table_name=, #transform_attribute_key, #transform_attributes, #transform_procedure_key, #transform_procedure_value, #transform_procedure_variables

Methods included from Util

#acronym_regex, #acronyms, #camelize, #demodulize, #underscore

Constructor Details

This class inherits a constructor from Toolhound::Base

Instance Method Details

#default_joinsObject



21
22
23
24
25
26
27
# File 'lib/toolhound-ruby/job.rb', line 21

def default_joins
  arr = []
  # arr << "INNER JOIN tblManufacturerText ON (tblManufacturerText.intManufacturerID = tblManufacturer.intManufacturerID AND varLocaleID = '#{locale}')"
  # arr << "INNER JOIN tblRentalDetail ON (tblRentalDetail.intRentalDetailID = tblRentalItem.intRentalDetailID)"

  arr
end

#default_selectsObject

self.table_name = :rental self.primary_key = :int_rental_id



12
13
14
15
16
17
18
19
# File 'lib/toolhound-ruby/job.rb', line 12

def default_selects
  {
    # manufacturer:   [:int_manufacturer_id ],
    # manufacturer_text: [:var_manufacturer, :var_phone, :var_fax, :var_url]
    # rental_item_detail: [:var_status, :status_date, ],
    # rental_detail: [:int_rental_id, :int_inventory_id, :int_quantity, :dec_daily, :dec_weekly, :dec_monthly, :dec_selling_price],
  }
end

#insert(variables = {}) ⇒ Object



29
30
31
32
# File 'lib/toolhound-ruby/job.rb', line 29

def insert(variables = {})
  vars = {created_user_id: 1, modified_user_id: 1, active: true, job: nil, created_date: nil, modified_date: nil}
  # procedure("Job_Insert", vars)
end

#remove(job_id) ⇒ Object



34
35
36
# File 'lib/toolhound-ruby/job.rb', line 34

def remove(job_id)
  # procedure("Job_Delete", {job_id: job_id})
end