Class: Knowledge::Setters::Rails

Inherits:
Base
  • Object
show all
Defined in:
lib/knowledge/setters/rails.rb

Overview

Description

Using rails app configuration.

Usage

@example:

Knowledge::Setters::Rails.new.set(name: :foo, value: 'bar')

Instance Method Summary collapse

Instance Method Details

#set(name:, value:) ⇒ Object

Sets the variable in rails app.

Parameters

Parameters:

  • :name (String | Symbol)
  • :value (Any)


27
28
29
# File 'lib/knowledge/setters/rails.rb', line 27

def set(name:, value:)
  ::Rails.application.config.public_send("#{name}=", value)
end