Module: Clevic::SimplestDelegate
- Included in:
- DistinctDelegate, SetDelegate
- Defined in:
- lib/clevic/qt/simplest_delegate.rb
Overview
These methods are common between SetDelegate and DistinctDelegate
Instance Method Summary collapse
Instance Method Details
#editor_to_item(data) ⇒ Object
14 15 16 |
# File 'lib/clevic/qt/simplest_delegate.rb', line 14 def editor_to_item( data ) data.value end |
#item_to_editor(item) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/clevic/qt/simplest_delegate.rb', line 5 def item_to_editor( item ) if item.is_a?( Array ) [ item.last, item.first ] else [ item, item ] end end |