Class: Circuits::Terminal::Output
- Inherits:
-
Object
- Object
- Circuits::Terminal::Output
- Defined in:
- lib/circuits/terminal/output.rb
Overview
Gets set tcked then read
Instance Method Summary collapse
-
#get ⇒ Boolean
Gets the state of the terminal.
-
#initialize(opts = {}) ⇒ Output
constructor
Creates the output.
-
#set(state) ⇒ Object
The next state.
-
#tock ⇒ Object
Sets the state what was last set.
Constructor Details
#initialize(opts = {}) ⇒ Output
Creates the output
10 11 12 13 |
# File 'lib/circuits/terminal/output.rb', line 10 def initialize(opts = {}) @next_state = opts[:terminal] || opts[:state] || false tock end |
Instance Method Details
#get ⇒ Boolean
Gets the state of the terminal
17 18 19 |
# File 'lib/circuits/terminal/output.rb', line 17 def get @state end |
#set(state) ⇒ Object
The next state
23 24 25 |
# File 'lib/circuits/terminal/output.rb', line 23 def set(state) @next_state = state end |