# File lib/km.rb, line 67 def alias(name, alias_to) begin return unless is_initialized? generate_query('a', { '_n' => alias_to, '_p' => name }, false) rescue Exception => e log_error(e) end end
# File lib/km.rb, line 30 def init(key, options={}) default = { :host => @host, :log_dir => @log_dir, :to_stderr => @to_stderr, :use_cron => @use_cron } options.reverse_merge!(default) begin @key = key @host = options[:host] @log_dir = options[:log_dir] @use_cron = options[:use_cron] @to_stderr = options[:to_stderr] log_dir_writable? rescue Exception => e log_error(e) end end
# File lib/km.rb, line 54 def record(action,props={}) props = hash_keys_to_str(props) begin return unless is_initialized_and_identified? return set(action) if action.class == Hash props.update('_n' => action) generate_query('e', props) rescue Exception => e log_error(e) end end
Generated with the Darkfish Rdoc Generator 2.