Class: SlowBlink::REF

Inherits:
Type
  • Object
show all
Defined in:
lib/slow_blink/ref.rb

Overview

A REF is a type that points to a Group or a Definition by a reference string.

Instance Attribute Summary collapse

Attributes inherited from Type

#location

Instance Method Summary collapse

Methods inherited from Type

===, #sequence?

Instance Attribute Details

#refString (readonly)

Returns:

  • (String)


32
33
34
# File 'lib/slow_blink/ref.rb', line 32

def ref
  @ref
end

Instance Method Details

#dynamic?true, false

Returns:

  • (true, false)


35
36
37
# File 'lib/slow_blink/ref.rb', line 35

def dynamic?
    @dynamic
end

#resolveGroup, Definition

Returns:



40
41
42
43
44
45
46
47
48
49
50
# File 'lib/slow_blink/ref.rb', line 40

def resolve
    result = nil
    if @table
        if (result = @table[@ref]).nil?                    
            if @ns and @ref.split("::").size == 1
                result = @table[@ns + "::" + @ref]
            end
        end                
    end
    result
end