Class: C::Function
- Inherits:
-
Object
- Object
- C::Function
- Defined in:
- lib/cast-to-yaml/to_yaml.rb
Instance Method Summary collapse
Instance Method Details
#to_h_split(declaration, no_types = false) ⇒ Object
297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 |
# File 'lib/cast-to-yaml/to_yaml.rb', line 297 def to_h_split(declaration, no_types=false) res = {} res["kind"] = "function" if type res["type"] = type.to_h_split(declaration) else res["type"] = declaration.type.to_h_split end if !params.nil? res["params"] = if no_types params.collect{|p| p.name } else params.collect{|p| p.to_h_split } end end if var_args? res["var_args"] = true end res end |