Class: Katalyst::Tables::Suggestions::Base

Inherits:
Object
  • Object
show all
Defined in:
app/models/katalyst/tables/suggestions/base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ Base

Returns a new instance of Base.



9
10
11
# File 'app/models/katalyst/tables/suggestions/base.rb', line 9

def initialize(value)
  @value = value
end

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



7
8
9
# File 'app/models/katalyst/tables/suggestions/base.rb', line 7

def value
  @value
end

Instance Method Details

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


21
22
23
# File 'app/models/katalyst/tables/suggestions/base.rb', line 21

def eql?(other)
  other.class.eql?(self.class) && other.value.eql?(value)
end

#hashObject



17
18
19
# File 'app/models/katalyst/tables/suggestions/base.rb', line 17

def hash
  [self.class, value].hash
end

#inspectObject



25
26
27
# File 'app/models/katalyst/tables/suggestions/base.rb', line 25

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

#typeObject

Raises:

  • (NotImplementedError)


13
14
15
# File 'app/models/katalyst/tables/suggestions/base.rb', line 13

def type
  raise NotImplementedError
end