Class: Serega::AttributeValueResolvers::Const

Inherits:
Object
  • Object
show all
Defined in:
lib/serega/attribute_value_resolvers/const.rb

Overview

Value resolver class for attributes with :const option

Instance Method Summary collapse

Constructor Details

#initialize(const_value) ⇒ Const

Returns a new instance of Const.



27
28
29
# File 'lib/serega/attribute_value_resolvers/const.rb', line 27

def initialize(const_value)
  @const_value = const_value
end

Instance Method Details

#callObject

Returns the constant value

Returns:

  • (Object)

    the constant value



36
37
38
# File 'lib/serega/attribute_value_resolvers/const.rb', line 36

def call
  @const_value
end