Module: Loxxy::BackEnd::Entry

Included in:
Variable
Defined in:
lib/loxxy/back_end/entry.rb

Overview

Mix-in module that implements the expected common behaviour of entries placed in the symbol table.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#nameString (readonly)

Returns User-defined name of the entry.

Returns:

  • (String)

    User-defined name of the entry.



9
10
11
# File 'lib/loxxy/back_end/entry.rb', line 9

def name
  @name
end

Instance Method Details

#init_name(aName) ⇒ Object

Initialize the entry with given name

Parameters:

  • aName (String)

    The name of the entry



18
19
20
21
# File 'lib/loxxy/back_end/entry.rb', line 18

def init_name(aName)
  @name = aName.dup
  @name.freeze
end