Class: Katalyst::Tables::Suggestions::CustomValue

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

Instance Method Summary collapse

Methods inherited from Base

#eql?, #hash, #inspect

Constructor Details

#initialize(value, name:, type:) ⇒ CustomValue

Returns a new instance of CustomValue.



9
10
11
12
13
14
# File 'app/models/katalyst/tables/suggestions/custom_value.rb', line 9

def initialize(value, name:, type:)
  super(value)

  @name = name
  @attribute_type = type
end

Instance Method Details

#typeObject



16
17
18
# File 'app/models/katalyst/tables/suggestions/custom_value.rb', line 16

def type
  :custom_value
end

#valueObject



20
21
22
# File 'app/models/katalyst/tables/suggestions/custom_value.rb', line 20

def value
  to_param(@value)
end