~ubuntu-branches/ubuntu/utopic/ruby-gir-ffi/utopic-proposed

« back to all changes in this revision

Viewing changes to lib/ffi-glib/container_class_methods.rb

  • Committer: Package Import Robot
  • Author(s): TANIGUCHI Takaki
  • Date: 2014-06-22 16:13:36 UTC
  • mfrom: (10.1.1 sid)
  • Revision ID: package-import@ubuntu.com-20140622161336-zo88bzrlqw71cpyy
Tags: 0.7.4-1
* Imported Upstream version 0.7.4
* Bump Standards-Version to 3.9.5 (with no changes)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
module GLib
 
2
  # Common methods for container classes: Array, PtrArray, List, SList and
 
3
  # HashTable.
2
4
  module ContainerClassMethods
3
5
    def wrap typespec, ptr
4
6
      super(ptr).tap do |container|
6
8
      end
7
9
    end
8
10
 
9
 
    def from typespec, it
 
11
    def from typespec = :void, it
10
12
      case it
11
13
      when nil
12
14
        nil