Class: Frequent::Algorithm

Inherits:
Object
  • Object
show all
Defined in:
lib/frequent/algorithm.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(n, b) ⇒ Algorithm

Returns a new instance of Algorithm.



8
9
10
11
# File 'lib/frequent/algorithm.rb', line 8

def initialize(n, b)
  @n = n
  @b = b
end

Instance Attribute Details

#bObject (readonly)

Returns the value of attribute b.



6
7
8
# File 'lib/frequent/algorithm.rb', line 6

def b
  @b
end

#nObject (readonly)

Returns the value of attribute n.



6
7
8
# File 'lib/frequent/algorithm.rb', line 6

def n
  @n
end

Instance Method Details

#process(item) ⇒ Object

Raises:

  • (NotImplementedError)


13
14
15
# File 'lib/frequent/algorithm.rb', line 13

def process(item)
  raise NotImplementedError.new
end

#versionObject



17
18
19
# File 'lib/frequent/algorithm.rb', line 17

def version
  Frequent::VERSION
end