module GirFFI::FlagsBase

Base module for flags.

Public Instance Methods

[](arg) click to toggle source
# File lib/gir_ffi/flags_base.rb, line 26
def [](arg)
  self::BitMask[arg]
end
from_native(*args) click to toggle source
# File lib/gir_ffi/flags_base.rb, line 22
def from_native(*args)
  self::BitMask.from_native(*args).select { |_k, v| v }
end
native_type() click to toggle source
# File lib/gir_ffi/flags_base.rb, line 10
def native_type
  self::BitMask.native_type
end
to_native(value, context) click to toggle source
# File lib/gir_ffi/flags_base.rb, line 14
def to_native(value, context)
  case value
  when Symbol
    value = { value => true }
  end
  self::BitMask.to_native(value, context)
end