Module: Rediline::User::ClassMethods

Defined in:
lib/rediline/user.rb

Instance Method Summary collapse

Instance Method Details

#rediline(field_name, &block) ⇒ Object



8
9
10
11
12
13
14
15
16
17
# File 'lib/rediline/user.rb', line 8

def rediline(field_name, &block)
  define_method field_name.to_sym do
    Rediline::Timeline::User.new(field_name.to_sym, self, block)
  end
  
  private
  define_method "delete_rediline_#{field_name}" do
    send(field_name).destroy
  end
end