Class: EnumElementDef
- Defined in:
- lib/runtime.rb,
lib/generators/elixir_server_generator.rb
Instance Attribute Summary collapse
-
#doc ⇒ Object
readonly
Returns the value of attribute doc.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Attributes inherited from Def
Instance Method Summary collapse
- #elixir_name ⇒ Object
-
#initialize(ast) ⇒ EnumElementDef
constructor
A new instance of EnumElementDef.
Constructor Details
#initialize(ast) ⇒ EnumElementDef
Returns a new instance of EnumElementDef.
31 32 33 34 35 36 |
# File 'lib/runtime.rb', line 31 def initialize ast super ast @name = ast.name @value = ast.value @doc = ast.doc end |
Instance Attribute Details
#doc ⇒ Object (readonly)
Returns the value of attribute doc.
29 30 31 |
# File 'lib/runtime.rb', line 29 def doc @doc end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
29 30 31 |
# File 'lib/runtime.rb', line 29 def name @name end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
29 30 31 |
# File 'lib/runtime.rb', line 29 def value @value end |
Instance Method Details
#elixir_name ⇒ Object
40 41 42 |
# File 'lib/generators/elixir_server_generator.rb', line 40 def elixir_name ':' + @name.underscore end |