Sha256: ad2049399175f591abca54f0eb3706fd41466c254c17d5d85f4c6a00668f3a12

Contents?: true

Size: 443 Bytes

Versions: 6

Compression:

Stored size: 443 Bytes

Contents

module RbGCCXML

  # Represents an <EnumValue> node, which is an entry in an <Enumeration>
  class EnumValue < Node

    # Get the defined value of this EnumValue
    def value
      attributes["init"].to_i
    end

    # The qualified name of an EnumValue doesn't
    # include the name of the enum itself
    def qualified_name #:nodoc:
      "#{self.parent.parent.qualified_name}::#{self.name}"
    end
    once :qualified_name

  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rbgccxml-1.1.0 lib/rbgccxml/nodes/enum_value.rb
rbgccxml-1.0.4 lib/rbgccxml/nodes/enum_value.rb
rbgccxml-1.0.3 lib/rbgccxml/nodes/enum_value.rb
rbgccxml-1.0.2 lib/rbgccxml/nodes/enum_value.rb
rbgccxml-1.0.1 lib/rbgccxml/nodes/enum_value.rb
rbgccxml-1.0 lib/rbgccxml/nodes/enum_value.rb