Class: PiHole::DisableCommand
- Inherits:
-
Object
- Object
- PiHole::DisableCommand
- Defined in:
- lib/pi_hole/disable_command.rb
Overview
Temporarily disable PiHole blocking
Instance Attribute Summary collapse
-
#duration ⇒ Object
Returns the value of attribute duration.
Instance Method Summary collapse
-
#initialize(duration: 30) ⇒ DisableCommand
constructor
A new instance of DisableCommand.
-
#query_string ⇒ Object
String.
Constructor Details
#initialize(duration: 30) ⇒ DisableCommand
Returns a new instance of DisableCommand.
9 10 11 |
# File 'lib/pi_hole/disable_command.rb', line 9 def initialize(duration: 30) @duration = duration end |
Instance Attribute Details
#duration ⇒ Object
Returns the value of attribute duration.
6 7 8 |
# File 'lib/pi_hole/disable_command.rb', line 6 def duration @duration end |
Instance Method Details
#query_string ⇒ Object
Returns String.
14 15 16 |
# File 'lib/pi_hole/disable_command.rb', line 14 def query_string "disable=#{@duration}" end |