Sha256: d0ebfe5112854120ffcd44d6e00db54112acc8c649783bb133c8c548076b2cca

Contents?: true

Size: 717 Bytes

Versions: 3

Compression:

Stored size: 717 Bytes

Contents

module Analyst
  module Entities

    class InstanceMethod < Entity
      def name
        ast.children.first.to_s
      end
      def full_name
        parent.full_name + '#' + name
      end
    end

    # TODO HERE
    class ClassMethod < Entity
      def name
        ast.children.first.to_s
      end
      def full_name
        parent.full_name + '::' + name
      end
    end

    class SingletonMethod < Entity

      # NOTE: not a public API -- used by Entities::Class
      def target
        target, name, params, content = ast.children
        target
      end

      def name
        ast.children[1].to_s
      end

      def full_name
        parent.full_name + '::' + name
      end
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
analyst-0.14.2 lib/analyst/entities/method.rb
analyst-0.14.1 lib/analyst/entities/method.rb
analyst-0.14.0 lib/analyst/entities/method.rb