Class: NodeDef

Inherits:
Def
  • Object
show all
Defined in:
lib/runtime.rb,
lib/generators/elixir_server_generator.rb

Instance Attribute Summary collapse

Attributes inherited from Def

#ast

Instance Method Summary collapse

Constructor Details

#initialize(ast) ⇒ NodeDef

Returns a new instance of NodeDef.



58
59
60
61
62
63
64
65
# File 'lib/runtime.rb', line 58

def initialize ast
  super ast
  @name = ast.name
  @language = ast.language
  @nickname = ast.nickname
  @namespace = ast.namespace
  @doc = ast.doc
end

Instance Attribute Details

#docObject (readonly)

Returns the value of attribute doc.



56
57
58
# File 'lib/runtime.rb', line 56

def doc
  @doc
end

#languageObject (readonly)

Returns the value of attribute language.



56
57
58
# File 'lib/runtime.rb', line 56

def language
  @language
end

#nameObject (readonly)

Returns the value of attribute name.



56
57
58
# File 'lib/runtime.rb', line 56

def name
  @name
end

#namespaceObject (readonly)

Returns the value of attribute namespace.



56
57
58
# File 'lib/runtime.rb', line 56

def namespace
  @namespace
end

#nicknameObject (readonly)

Returns the value of attribute nickname.



56
57
58
# File 'lib/runtime.rb', line 56

def nickname
  @nickname
end

Instance Method Details

#elixir_behaviourObject



413
414
415
# File 'lib/generators/elixir_server_generator.rb', line 413

def elixir_behaviour
    @name + 'Behaviour'
end

#elixir_connectionObject



409
410
411
# File 'lib/generators/elixir_server_generator.rb', line 409

def elixir_connection
    @name + 'Connection'
end

#elixir_nameObject



405
406
407
# File 'lib/generators/elixir_server_generator.rb', line 405

def elixir_name
    @name.underscore
end