Class: FFIDB::Exporters::YAML

Inherits:
FFIDB::Exporter show all
Defined in:
lib/ffidb/exporters/yaml.rb

Overview

Code generator for the YAML markup language.

Instance Attribute Summary

Attributes inherited from FFIDB::Exporter

#options

Instance Method Summary collapse

Methods inherited from FFIDB::Exporter

#close, #debug?, #dlopen_paths_for, #emit, #export_header, #finish, for, #header?, #initialize, #verbose?

Constructor Details

This class inherits a constructor from FFIDB::Exporter

Instance Method Details

#beginObject



9
10
11
12
# File 'lib/ffidb/exporters/yaml.rb', line 9

def begin
  puts "# #{FFIDB.header}" if self.header?
  puts if self.header?
end

#begin_library(library) ⇒ Object



14
# File 'lib/ffidb/exporters/yaml.rb', line 14

def begin_library(library) end

#export_symbol(symbol, **kwargs) ⇒ Object Also known as: export_typedef, export_enum, export_struct, export_union, export_function



16
17
18
19
20
21
22
# File 'lib/ffidb/exporters/yaml.rb', line 16

def export_symbol(symbol, **kwargs)
  @counter ||= 0
  puts unless @counter.zero?
  puts "# #{symbol.instance_variable_get(:@debug)}" if self.debug? && symbol.instance_variable_get(:@debug)
  puts symbol.to_yaml
  @counter += 1
end

#finish_libraryObject



29
# File 'lib/ffidb/exporters/yaml.rb', line 29

def finish_library() end