Class: Opencdd::Cddal::AST::ImportedName

Inherits:
Struct
  • Object
show all
Defined in:
lib/opencdd/cddal/ast.rb

Overview

One name in a selective import (from "x" import { Foo, Bar as B }). as is the optional local rename; when nil, the name is bound under its original form.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#asObject

Returns the value of attribute as

Returns:

  • (Object)

    the current value of as



42
43
44
# File 'lib/opencdd/cddal/ast.rb', line 42

def as
  @as
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



42
43
44
# File 'lib/opencdd/cddal/ast.rb', line 42

def name
  @name
end

Instance Method Details

#local_nameObject



43
44
45
# File 'lib/opencdd/cddal/ast.rb', line 43

def local_name
  as || name
end