Method: OllamaChat::Switches::Switch#initialize

Defined in:
lib/ollama_chat/switches.rb

#initialize(name, msg:, config:) ⇒ Switch

Returns a new instance of Switch.



19
20
21
22
# File 'lib/ollama_chat/switches.rb', line 19

def initialize(name, msg:, config:)
  @value = [ false, true ].include?(config) ? config : !!config.send("#{name}?")
  @msg   = msg
end