Class: C::TranslationUnit

Inherits:
Object
  • Object
show all
Defined in:
lib/cast-to-yaml/to_yaml.rb

Instance Method Summary collapse

Instance Method Details

#extract_declarations(res = Hash::new { |h, k| h[k] = [] }) ⇒ Object



143
144
145
146
147
148
149
150
# File 'lib/cast-to-yaml/to_yaml.rb', line 143

def extract_declarations(res = Hash::new { |h, k| h[k] = [] })
  entities.select { |e|
    e.kind_of? Declaration
  }.each { |e|
    e.extract(res, declarations: true)
  }
  res
end