Sha256: 0fbd64ab5c597c1eba010874342168b0ac0ab65f1bcbe6deda7a430c77c81942

Contents?: true

Size: 531 Bytes

Versions: 3

Compression:

Stored size: 531 Bytes

Contents

module Simplabs

  module Excellent

    module Parsing

      class CvarContext < SexpContext #:nodoc:

        def initialize(exp, parent)
          super
          @name = exp[1].to_s.sub(/^@+/, '')
        end

        def full_name
          return @name if !@parent
          full_name = @name
          parent    = @parent
          parent    = parent.parent until parent.is_a?(ClassContext) || parent.is_a?(ModuleContext)
          full_name = "#{parent.full_name}.#{full_name}"
        end

      end

    end

  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
excellent-1.7.1 lib/simplabs/excellent/parsing/cvar_context.rb
excellent-1.7.0 lib/simplabs/excellent/parsing/cvar_context.rb
excellent-1.6.0 lib/simplabs/excellent/parsing/cvar_context.rb