Module: Searchractor

Defined in:
lib/searchractor.rb

Overview

Public: Searchractor’s methods.

Defined Under Namespace

Modules: InstanceMethods

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object

Internal: Add Searchractor’s behaviour in the including class.



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/searchractor.rb', line 4

def self.included(base)
  base.class_eval do
    # Public: Defines an initialized @list as readable in the including class.
    # Same as doing the following in the calling class:
    #
    # class CallingClass
    #   attr_reader :list
    #
    #   def initialize(list)
    #     @list = list
    #   end
    # end
    attr_reader :list

    include InstanceMethods
  end
end