Class: EnumVariable

Inherits:
Node
  • Object
show all
Defined in:
lib/steamd/nodes/enum_variable_node.rb

Overview

Represents a variable declared in an Enum

Examples:

Invalid = 0

Instance Method Summary collapse

Instance Method Details

#nameObject

The name of the EnumVariable



8
9
10
# File 'lib/steamd/nodes/enum_variable_node.rb', line 8

def name
  enum_variable_name.text_value
end

#to_hashObject

Hash representation of the EnumVariable



18
19
20
21
22
23
# File 'lib/steamd/nodes/enum_variable_node.rb', line 18

def to_hash
  {
    name: name,
    value: value
  }
end

#valueObject

The value of the EnumVariable



13
14
15
# File 'lib/steamd/nodes/enum_variable_node.rb', line 13

def value
  enum_variable_value.value
end