Class: Katalyst::Tables::Suggestions::ConstantValue

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

Instance Method Summary collapse

Methods inherited from Base

#eql?, #hash, #inspect

Constructor Details

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

Returns a new instance of ConstantValue.



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

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

  @attribute_type = type
  @name = name
end

Instance Method Details

#typeObject



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

def type
  :constant_value
end

#valueObject



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

def value
  to_param(@value)
end