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:, model:, column:, value:) ⇒ ConstantValue

Returns a new instance of ConstantValue.



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

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

  @attribute_type = type
  @model = model
  @column = column
  @name = name
end

Instance Method Details

#typeObject



18
19
20
# File 'app/models/katalyst/tables/suggestions/constant_value.rb', line 18

def type
  :constant_value
end

#valueObject



22
23
24
# File 'app/models/katalyst/tables/suggestions/constant_value.rb', line 22

def value
  to_param(@value)
end