Class: Jah::History

Inherits:
Object
  • Object
show all
Defined in:
lib/jah/history.rb

Class Method Summary collapse

Class Method Details

.all(filter = nil) ⇒ Object



14
15
16
# File 'lib/jah/history.rb', line 14

def all(filter = nil)
  filter ? @cache.select { |i| i[0] =~ /#{filter}/ } : @cache
end

.method_missing(*meth) ⇒ Object

delegate?



19
20
21
# File 'lib/jah/history.rb', line 19

def method_missing(*meth)
  @cache.send(*meth)
end

.set(jid, body, time = Time.now) ⇒ Object Also known as: add



9
10
11
# File 'lib/jah/history.rb', line 9

def set(jid, body, time = Time.now)
  @cache << [jid, body, time]
end