Module: OllamaChat::Switches::CheckSwitch
- Extended by:
- Tins::Concern
- Included in:
- CombinedSwitch, Switch
- Defined in:
- lib/ollama_chat/switches.rb
Overview
A module that provides switch state checking functionality.
The CheckSwitch module adds methods for checking the boolean state of switches and displaying their current status. It’s designed to be included in switch classes to provide consistent behavior for querying switch states and outputting status messages.
Instance Method Summary collapse
-
#off? ⇒ TrueClass, FalseClass
The off? method returns true if the switch is in the off state, false otherwise.
-
#show ⇒ void
The show method outputs the current value of the message to standard output.
Instance Method Details
#off? ⇒ TrueClass, FalseClass
The off? method returns true if the switch is in the off state, false otherwise.
37 38 39 |
# File 'lib/ollama_chat/switches.rb', line 37 def off? !on? end |
#show ⇒ void
This method returns an undefined value.
The show method outputs the current value of the message to standard output.
45 46 47 |
# File 'lib/ollama_chat/switches.rb', line 45 def show STDOUT.puts @msg[value] end |