Class: TTT::Binary
- Inherits:
-
Object
- Object
- TTT::Binary
- Defined in:
- lib/ttt/binary.rb
Overview
The code for ttt/bin
Defined Under Namespace
Classes: Parser
Instance Attribute Summary collapse
-
#fileerr ⇒ Object
Returns the value of attribute fileerr.
-
#filein ⇒ Object
Returns the value of attribute filein.
-
#fileout ⇒ Object
Returns the value of attribute fileout.
Instance Method Summary collapse
- #has_interface?(interface_name) ⇒ Boolean
-
#initialize(argv, io = {}) ⇒ Binary
constructor
A new instance of Binary.
- #interface(interface_name) ⇒ Object
- #list_of_registered ⇒ Object
- #parse(argv) ⇒ Object
Constructor Details
#initialize(argv, io = {}) ⇒ Binary
Returns a new instance of Binary.
12 13 14 15 16 17 |
# File 'lib/ttt/binary.rb', line 12 def initialize(argv, io={}) self.fileout = io.fetch :fileout, $stdout self.fileerr = io.fetch :fileerr, $stderr self.filein = io.fetch :filein, $stdin parse argv end |
Instance Attribute Details
#fileerr ⇒ Object
Returns the value of attribute fileerr.
10 11 12 |
# File 'lib/ttt/binary.rb', line 10 def fileerr @fileerr end |
#filein ⇒ Object
Returns the value of attribute filein.
10 11 12 |
# File 'lib/ttt/binary.rb', line 10 def filein @filein end |
#fileout ⇒ Object
Returns the value of attribute fileout.
10 11 12 |
# File 'lib/ttt/binary.rb', line 10 def fileout @fileout end |
Instance Method Details
#has_interface?(interface_name) ⇒ Boolean
27 28 29 |
# File 'lib/ttt/binary.rb', line 27 def has_interface?(interface_name) TTT::Interface.registered? interface_name end |
#interface(interface_name) ⇒ Object
35 36 37 |
# File 'lib/ttt/binary.rb', line 35 def interface(interface_name) TTT::Interface.registered[interface_name] end |
#list_of_registered ⇒ Object
31 32 33 |
# File 'lib/ttt/binary.rb', line 31 def list_of_registered TTT::Interface.registered_names.map(&:inspect).join(', ') end |