class BillTrap::Client
Public Class Methods
get(c)
click to toggle source
Retrieve client If numeric, assumes it’s an ID If string, returns first match c == surname Returns nil otherwise / if no match was found
# File lib/billtrap/models.rb, line 16 def self.get c if is_i? c Client[c] elsif c.is_a? String Client.find(:surname => c) else nil end end
Public Instance Methods
name()
click to toggle source
# File lib/billtrap/models.rb, line 27 def name "#{firstname} #{surname}" end