Class: String

Inherits:
Object show all
Defined in:
lib/lore/bits.rb,
lib/lore/clause.rb

Direct Known Subclasses

Lore::Clause

Instance Method Summary collapse

Instance Method Details

#empty?Boolean

Returns:

  • (Boolean)


61
62
63
# File 'lib/lore/bits.rb', line 61

def empty? 
  return self == ''
end

#lore_escapeObject

Poor man’s SQL injection prevention …



7
8
9
10
11
# File 'lib/lore/clause.rb', line 7

def lore_escape
  self.gsub!("'","X")
  self.gsub!('"','X')
  self
end