Class: C::Union
- Inherits:
-
Object
- Object
- C::Union
- Defined in:
- lib/cast-to-yaml/to_yaml.rb
Instance Method Summary collapse
Instance Method Details
#to_h_split(_ = nil) ⇒ Object
177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 |
# File 'lib/cast-to-yaml/to_yaml.rb', line 177 def to_h_split(_ = nil) res = {} res["kind"] = "union" if name res["name"] = name else m = [] members.each { |mem| m += mem.to_a } res["members"] = m end res["const"] = true if const? res["restrict"] = true if restrict? res["volatile"] = true if volatile? res end |