Sha256: 9b437c15e70110501d5866926b689e0b6e2b9bac5f428b51d52595d256e22edc

Contents?: true

Size: 1.58 KB

Versions: 1

Compression:

Stored size: 1.58 KB

Contents

module Steep
  module AST
    module Signature
      module Members
        class Include
          attr_reader :location
          attr_reader :name
          attr_reader :args

          def initialize(location:, name:, args:)
            @location = location
            @name = name
            @args = args
          end
        end

        class Extend
          attr_reader :location
          attr_reader :name
          attr_reader :args

          def initialize(location:, name:, args:)
            @location = location
            @name = name
            @args = args
          end
        end

        class Method
          attr_reader :location
          attr_reader :name
          attr_reader :kind
          attr_reader :types
          attr_reader :attributes

          def initialize(location:, name:, kind:, types:, attributes:)
            @location = location
            @name = name
            @kind = kind
            @types = types
            @attributes = attributes
          end

          def module_method?
            kind == :module || kind == :module_instance
          end

          def instance_method?
            kind == :instance || kind == :module_instance
          end

          def constructor?
            attributes.include?(:constructor)
          end
        end

        class Ivar
          attr_reader :location
          attr_reader :name
          attr_reader :type

          def initialize(location:, name:, type:)
            @location = location
            @name = name
            @type = type
          end
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
steep-0.1.0 lib/steep/ast/signature/members.rb