class Great::Text
Public Class Methods
hi()
click to toggle source
# File lib/great.rb, line 11 def self.hi puts "hello" end
new()
click to toggle source
# File lib/great.rb, line 14 def initialize puts "initialised" end
pluralize(word)
click to toggle source
# File lib/great.rb, line 32 def self.pluralize(word) word.pluralize end
search(data)
click to toggle source
# File lib/great.rb, line 25 def self.search(data) if data.downcase == "geetha" 'geetha' else "end" end end
searchable_language()
click to toggle source
# File lib/great.rb, line 35 def self.searchable_language 'english' end
Public Instance Methods
add(a,b)
click to toggle source
# File lib/great.rb, line 17 def add(a,b) res = a.to_i + b.to_i res end
sub(a,b)
click to toggle source
# File lib/great.rb, line 21 def sub(a,b) res = a.to_i - b.to_i res end
Private Instance Methods
quoted_language()
click to toggle source
# File lib/great.rb, line 43 def quoted_language @quoted_language ||= connection.quote(searchable_language) end
searchable_columns()
click to toggle source
# File lib/great.rb, line 40 def searchable_columns columns.select {|column| [:string, :text].include? column.type }.map(&:name) end
searchable_language()
click to toggle source
# File lib/great.rb, line 46 def searchable_language Great.searchable_language end