Sha256: 2431183ca2b60ab00f80b9507749742733fb3613b481d282f8f59bde48e714c2

Contents?: true

Size: 300 Bytes

Versions: 10

Compression:

Stored size: 300 Bytes

Contents

module Clevic

# These methods are common between SetDelegate and DistinctDelegate
module SimplestDelegate
  def item_to_editor( item )
    if item.is_a?( Array )
      [ item.last, item.first ]
    else
      [ item, item ]
    end
  end


  def editor_to_item( data )
    data.value
  end
end

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
clevic-0.14.6 lib/clevic/qt/simplest_delegate.rb
clevic-0.14.5 lib/clevic/qt/simplest_delegate.rb
clevic-0.14.4 lib/clevic/qt/simplest_delegate.rb
clevic-0.14.3 lib/clevic/qt/simplest_delegate.rb
clevic-0.14.2 lib/clevic/qt/simplest_delegate.rb
clevic-0.14.1 lib/clevic/qt/simplest_delegate.rb
clevic-0.14.0 lib/clevic/qt/simplest_delegate.rb
clevic-0.13.0.b12 lib/clevic/qt/simplest_delegate.rb
clevic-0.13.0.b11 lib/clevic/qt/simplest_delegate.rb
clevic-0.13.0.b10 lib/clevic/qt/simplest_delegate.rb