Class: FSR::App::Fifo
- Inherits:
-
Application
- Object
- Application
- FSR::App::Fifo
- Defined in:
- lib/fsr/app/fifo.rb
Instance Attribute Summary collapse
-
#direction ⇒ Object
Returns the value of attribute direction.
-
#name ⇒ Object
Returns the value of attribute name.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Class Method Summary collapse
Instance Method Summary collapse
- #arguments ⇒ Object
-
#initialize(name, direction = nil, options = nil) ⇒ Fifo
constructor
A new instance of Fifo.
Methods inherited from Application
#app_name, #raw, #sendmsg, #to_s
Constructor Details
#initialize(name, direction = nil, options = nil) ⇒ Fifo
Returns a new instance of Fifo.
17 18 19 20 21 22 23 24 |
# File 'lib/fsr/app/fifo.rb', line 17 def initialize(name, direction = nil, = nil) # These are options that will precede the target address @name = name @direction = direction || "in" raise "Direction must be 'in' or 'out'" unless @direction.match(/^(?:in|out)$/) @options = || {} raise "options must be a hash" unless @options.kind_of?(Hash) end |
Instance Attribute Details
#direction ⇒ Object
Returns the value of attribute direction.
6 7 8 |
# File 'lib/fsr/app/fifo.rb', line 6 def direction @direction end |
#name ⇒ Object
Returns the value of attribute name.
6 7 8 |
# File 'lib/fsr/app/fifo.rb', line 6 def name @name end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
7 8 9 |
# File 'lib/fsr/app/fifo.rb', line 7 def @options end |
Class Method Details
.<<(name) ⇒ Object
9 10 11 |
# File 'lib/fsr/app/fifo.rb', line 9 def self.<<(name) new(name) end |
.>>(name) ⇒ Object
13 14 15 |
# File 'lib/fsr/app/fifo.rb', line 13 def self.>>(name) new(name, "out", :wait => true) end |
Instance Method Details
#arguments ⇒ Object
26 27 28 29 30 31 32 |
# File 'lib/fsr/app/fifo.rb', line 26 def arguments @args = [@name, @direction] if @direction == "out" @args << ([:wait] ? "wait" : "nowait") end @args end |