Sha256: bddf0a7c1d9480bca2416bdb3eda9d640fdbb7de9a27d985d050b0be60bf62f0

Contents?: true

Size: 319 Bytes

Versions: 3

Compression:

Stored size: 319 Bytes

Contents

module Xdrgen::AST
  module Concerns
    module Named
      delegate :name, to: :identifier

      def namespaces
        return [] unless self.is_a?(Contained)
        self.find_ancestors(Concerns::Namespace)
      end

      def fully_qualified_name
        namespaces.map(&:name) + [name]
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
xdrgen-0.1.1 lib/xdrgen/ast/concerns/named.rb
xdrgen-0.1.0 lib/xdrgen/ast/concerns/named.rb
xdrgen-0.0.1 lib/xdrgen/ast/concerns/named.rb