Class: Lignite::SystemCommands
- Inherits:
-
Object
- Object
- Lignite::SystemCommands
- Extended by:
- Logger
- Defined in:
- lib/lignite/system_commands.rb
Overview
The commands that cannot appear in a .rbf program, used mostly for program manipulation
Class Method Summary collapse
Instance Method Summary collapse
- #close ⇒ Object
-
#initialize(conn = Connection.create) ⇒ SystemCommands
constructor
A new instance of SystemCommands.
Methods included from Logger
Methods included from Bytes
#bin_to_hex, #f32, #hex_to_bin, #u16, #u32, #u8, #unpack_f32, #unpack_u16, #unpack_u32, #unpack_u8
Constructor Details
#initialize(conn = Connection.create) ⇒ SystemCommands
Returns a new instance of SystemCommands.
16 17 18 19 |
# File 'lib/lignite/system_commands.rb', line 16 def initialize(conn = Connection.create) @conn = conn load_yml end |
Class Method Details
.run(conn = Connection.create, &block) ⇒ Object
9 10 11 12 13 |
# File 'lib/lignite/system_commands.rb', line 9 def self.run(conn = Connection.create, &block) sc = new(conn) sc.instance_exec(&block) sc.close end |
Instance Method Details
#close ⇒ Object
21 22 23 |
# File 'lib/lignite/system_commands.rb', line 21 def close @conn.close end |