Class: Object

Inherits:
BasicObject
Includes:
DohData
Defined in:
lib/doh/core/object.rb,
lib/doh/logger/proxy.rb,
lib/doh/mysql/to_sql.rb,
lib/doh/util/to_display.rb,
lib/doh/data/make_global.rb

Instance Method Summary collapse

Methods included from DohData

add_to_catalog, catalog, catalog=, catalog_list, #random_alnum, #random_amount, #random_array_element, #random_bank_account_number, #random_bank_routing_number, #random_birthday, #random_bool, #random_characters, #random_city, #random_country_code, #random_date, #random_digits, #random_element, #random_email, #random_employer_name, #random_first_name, #random_full_name, #random_generation, #random_int, #random_ip_address, #random_last_name, #random_letters, #random_occupation, #random_percent, #random_range, #random_relation, #random_ssn, #random_street, #random_street_name, #random_street_number, #random_street_type, #random_us_phone, #random_us_state, #random_us_state_abbreviation, #random_us_state_long_name, #random_us_zip, require_datagen, search_catalog, #ssn_areas

Instance Method Details

#cache_result(*methods) ⇒ Object



2
3
4
5
# File 'lib/doh/core/object.rb', line 2

def cache_result(*methods)
  # kjmtodo - implement this to make wrappers around methods that would otherwise look like:
  # @cachevar = some_value if !defined?(@cachevar)
end

#dohlogObject



50
51
52
# File 'lib/doh/logger/proxy.rb', line 50

def dohlog
  self.class.dohlog
end

#to_displayObject



5
6
7
# File 'lib/doh/util/to_display.rb', line 5

def to_display
  to_s
end

#to_sqlObject



11
12
13
14
15
16
17
18
# File 'lib/doh/mysql/to_sql.rb', line 11

def to_sql
  if $mysql_loaded
    str = Mysql.escape_string(to_s)
  else
    str = non_mysql_escape_string
  end
  '"' + str + '"'
end