Sha256: 09ed1133c2624ab6b4a73b2da81ada2c03a519e773467956345e339bdd777835

Contents?: true

Size: 531 Bytes

Versions: 7

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.blank?
          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

7 entries across 7 versions & 1 rubygems

Version Path
simplabs-excellent-1.2.1 lib/simplabs/excellent/parsing/cvar_context.rb
simplabs-excellent-1.2.2 lib/simplabs/excellent/parsing/cvar_context.rb
simplabs-excellent-1.3.0 lib/simplabs/excellent/parsing/cvar_context.rb
simplabs-excellent-1.3.1 lib/simplabs/excellent/parsing/cvar_context.rb
simplabs-excellent-1.4.0 lib/simplabs/excellent/parsing/cvar_context.rb
simplabs-excellent-1.4.1 lib/simplabs/excellent/parsing/cvar_context.rb
simplabs-excellent-1.4.2 lib/simplabs/excellent/parsing/cvar_context.rb