Module: ActiveRecord::VirtualBase::VirtualInstanceMethods
- Defined in:
- lib/galaxy/virtual_base.rb
Instance Method Summary collapse
Instance Method Details
#add(key = nil) ⇒ Object
96 97 98 99 100 101 |
# File 'lib/galaxy/virtual_base.rb', line 96 def add key = nil return false unless self.class.dataset self.class.dataset.send(self.class.table_name.to_sym) << self self.class.dataset.send(self.class.table_name.to_sym)[key] = self if key true end |
#kill ⇒ Object
103 104 105 106 107 |
# File 'lib/galaxy/virtual_base.rb', line 103 def kill return false unless self.class.dataset self.class.dataset.send(self.class.table_name.to_sym) >> self rescue false end |