Class: RMXFirebaseTableViewCell
- Inherits:
-
RMXTableViewCell
- Object
- RMXTableViewCell
- RMXFirebaseTableViewCell
- Extended by:
- RMXFirebaseHandleModel
- Defined in:
- lib/motion/RMXFirebaseTableViewCell.rb
Instance Method Summary collapse
- #changed ⇒ Object
- #data=(val) ⇒ Object
- #model ⇒ Object
- #model=(val) ⇒ Object
- #prepareForReuse ⇒ Object
- #reset ⇒ Object
Methods included from RMXFirebaseHandleModel
Instance Method Details
#changed ⇒ Object
17 18 |
# File 'lib/motion/RMXFirebaseTableViewCell.rb', line 17 def changed end |
#data=(val) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/motion/RMXFirebaseTableViewCell.rb', line 20 def data=(val) return @data if val == @data @data = val if @data unless @data.ready? raise "#{className} tried to use a model that is not ready: #{@data.inspect}" end @data_unbinder = @data.always do |m| next unless m == @data changed end end @data end |
#model ⇒ Object
35 36 37 |
# File 'lib/motion/RMXFirebaseTableViewCell.rb', line 35 def model @data end |
#model=(val) ⇒ Object
39 40 41 |
# File 'lib/motion/RMXFirebaseTableViewCell.rb', line 39 def model=(val) self.data = val end |
#prepareForReuse ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/motion/RMXFirebaseTableViewCell.rb', line 5 def prepareForReuse if @data @data_unbinder.call if @data_unbinder @data_unbinder = nil end @data = nil reset end |
#reset ⇒ Object
14 15 |
# File 'lib/motion/RMXFirebaseTableViewCell.rb', line 14 def reset end |