def global_by_id
      unless @global_map_by_id
        # Make copy of parent class members.
        # Otherwise we'll be merging directly into parent class.
        @global_map_by_id = @cls.parent ? @cls.parent.members_index.global_by_id.clone : {}

        @cls.mixins.each do |mix|
          merge!(@global_map_by_id, mix.members_index.global_by_id)
        end

        # Exclude all non-inheritable static members
        @global_map_by_id.delete_if {|id, m| m[:static] && !m[:inheritable] }

        merge!(@global_map_by_id, local_by_id)
      end

      @global_map_by_id
    end
def global_by_id
      unless @global_map_by_id
        # Make copy of parent class members.
        # Otherwise we'll be merging directly into parent class.
        @global_map_by_id = @cls.parent ? @cls.parent.members_index.global_by_id.clone : {}

        @cls.mixins.each do |mix|
          merge!(@global_map_by_id, mix.members_index.global_by_id)
        end

        # Exclude all non-inheritable static members
        @global_map_by_id.delete_if {|id, m| m[:static] && !m[:inheritable] }

        merge!(@global_map_by_id, local_by_id)
      end

      @global_map_by_id
    end
Returns hash of all members by ID (including inherited ones)