Class: C::Enum
- Inherits:
-
Object
- Object
- C::Enum
- Defined in:
- lib/cast-to-yaml/to_yaml.rb
Instance Method Summary collapse
Instance Method Details
#to_h_split ⇒ Object
197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 |
# File 'lib/cast-to-yaml/to_yaml.rb', line 197 def to_h_split res = {} res["kind"] = "enum" if name res["name"] = name else m = [] members.each { |mem| m.push mem.to_h_split } res["members"] = m end res["const"] = true if const? res["restrict"] = true if restrict? res["volatile"] = true if volatile? res end |