Class: Katalyst::Tables::Collection::Reducers::Reducer

Inherits:
Object
  • Object
show all
Defined in:
app/models/concerns/katalyst/tables/collection/reducers.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(klass) ⇒ Reducer

Returns a new instance of Reducer.



57
58
59
# File 'app/models/concerns/katalyst/tables/collection/reducers.rb', line 57

def initialize(klass)
  @klass = klass
end

Instance Attribute Details

#klassObject (readonly)

Returns the value of attribute klass.



55
56
57
# File 'app/models/concerns/katalyst/tables/collection/reducers.rb', line 55

def klass
  @klass
end

Instance Method Details

#==(other) ⇒ Object



65
66
67
# File 'app/models/concerns/katalyst/tables/collection/reducers.rb', line 65

def ==(other)
  klass.name == other.klass.name
end

#build(app) ⇒ Object



61
62
63
# File 'app/models/concerns/katalyst/tables/collection/reducers.rb', line 61

def build(app)
  klass.new(app)
end

#inspectObject



69
70
71
# File 'app/models/concerns/katalyst/tables/collection/reducers.rb', line 69

def inspect
  "#<#{self.class.name} #{klass.name}>"
end