Class: Randsum::Filter

Inherits:
Object
  • Object
show all
Defined in:
lib/randsum/filters/filter.rb

Direct Known Subclasses

Dropper

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(quantity:, rolls:) ⇒ Filter

Returns a new instance of Filter.



5
6
7
8
# File 'lib/randsum/filters/filter.rb', line 5

def initialize(quantity:, rolls:)
  @quantity = quantity
  @rolls = rolls
end

Instance Attribute Details

#quantityObject (readonly)

Returns the value of attribute quantity.



3
4
5
# File 'lib/randsum/filters/filter.rb', line 3

def quantity
  @quantity
end

#rollsObject (readonly)

Returns the value of attribute rolls.



3
4
5
# File 'lib/randsum/filters/filter.rb', line 3

def rolls
  @rolls
end

Instance Method Details

#filterObject

Raises:

  • (NotImplementedError)


10
11
12
# File 'lib/randsum/filters/filter.rb', line 10

def filter
  raise NotImplementedError
end