module FFIDB::Symbolic
Public Instance Methods
<=>(other)
click to toggle source
@param [Symbolic] other @return [Integer]
# File lib/ffidb/symbolic.rb, line 10 def <=>(other) self.name <=> other.name end
enum?()
click to toggle source
@return [Boolean]
# File lib/ffidb/symbolic.rb, line 44 def enum?() return false end
function?()
click to toggle source
@return [Boolean]
# File lib/ffidb/symbolic.rb, line 56 def function?() return false end
kind()
click to toggle source
@return [Symbol]
# File lib/ffidb/symbolic.rb, line 16 def kind case when self.typedef? then :typedef when self.enum? then :enum when self.struct? then :struct when self.union? then :union when self.function? then :function end end
kind_weight()
click to toggle source
@return [Integer]
# File lib/ffidb/symbolic.rb, line 28 def kind_weight case when self.typedef? then 1 when self.enum? then 2 when self.struct? then 3 when self.union? then 4 when self.function? then 5 end end
struct?()
click to toggle source
@return [Boolean]
# File lib/ffidb/symbolic.rb, line 48 def struct?() return false end
to_yaml()
click to toggle source
@return [String]
# File lib/ffidb/symbolic.rb, line 60 def to_yaml h = self.to_h h.transform_keys!(&:to_s) h.transform_values! { |v| v.is_a?(Hash) ? v.transform_keys!(&:to_s) : v } YAML.dump(h).gsub!("---\n", "--- !#{self.kind}\n") end
typedef?()
click to toggle source
@return [Boolean]
# File lib/ffidb/symbolic.rb, line 40 def typedef?() return false end
union?()
click to toggle source
@return [Boolean]
# File lib/ffidb/symbolic.rb, line 52 def union?() return false end