Sha256: 1e17c3fec268cc485cd75e5eac69960c6d19492caaf9150f1b1c570aa43adf99

Contents?: true

Size: 482 Bytes

Versions: 23

Compression:

Stored size: 482 Bytes

Contents

module WebIDL
  module Ast
    class ScopedName < Node

      attr_reader :name

      def initialize(parent, name, opts = {})
        super(parent)

        @name     = name
        @relative = !!opts[:relative]
      end

      def qualified_name
        if relative? && @parent
          "#{@parent.qualified_name}::#{@name}"
        else
          "::#{@name}"
        end
      end

      def relative?
        @relative
      end

    end # ScopedName
  end # Ast
end # WebIDL

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
webidl-0.2.2 lib/webidl/ast/scoped_name.rb
webidl-0.2.1 lib/webidl/ast/scoped_name.rb
webidl-0.1.10 lib/webidl/ast/scoped_name.rb
webidl-0.2.0 lib/webidl/ast/scoped_name.rb
webidl-0.1.9 lib/webidl/ast/scoped_name.rb
webidl-0.1.8 lib/webidl/ast/scoped_name.rb
webidl-0.1.7 lib/webidl/ast/scoped_name.rb
webidl-0.1.6 lib/webidl/ast/scoped_name.rb
webidl-0.1.5 lib/webidl/ast/scoped_name.rb
webidl-0.1.4 lib/webidl/ast/scoped_name.rb
webidl-0.1.3 lib/webidl/ast/scoped_name.rb
webidl-0.1.2 lib/webidl/ast/scoped_name.rb
webidl-0.1.1 lib/webidl/ast/scoped_name.rb
webidl-0.1.0 lib/webidl/ast/scoped_name.rb
webidl-0.0.9 lib/webidl/ast/scoped_name.rb
webidl-0.0.8 lib/webidl/ast/scoped_name.rb
webidl-0.0.7 lib/webidl/ast/scoped_name.rb
webidl-0.0.6 lib/webidl/ast/scoped_name.rb
webidl-0.0.5 lib/webidl/ast/scoped_name.rb
webidl-0.0.4 lib/webidl/ast/scoped_name.rb