Class: FSR::App::Fifo
- Inherits:
-
Application
- Object
- Application
- FSR::App::Fifo
- Defined in:
- lib/fsr/app/fifo.rb
Instance Attribute Summary (collapse)
-
- (Object) direction
Returns the value of attribute direction.
-
- (Object) name
Returns the value of attribute name.
-
- (Object) options
readonly
Returns the value of attribute options.
Class Method Summary (collapse)
Instance Method Summary (collapse)
- - (Object) arguments
-
- (Fifo) initialize(name, direction = nil, options = nil)
constructor
A new instance of Fifo.
Methods inherited from Application
#app_name, #raw, #sendmsg, #to_s
Constructor Details
- (Fifo) initialize(name, direction = nil, options = nil)
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)$/) = || {} raise "options must be a hash" unless .kind_of?(Hash) end |
Instance Attribute Details
- (Object) direction
Returns the value of attribute direction
6 7 8 |
# File 'lib/fsr/app/fifo.rb', line 6 def direction @direction end |
- (Object) name
Returns the value of attribute name
6 7 8 |
# File 'lib/fsr/app/fifo.rb', line 6 def name @name end |
- (Object) options (readonly)
Returns the value of attribute options
7 8 9 |
# File 'lib/fsr/app/fifo.rb', line 7 def end |
Class Method Details
+ (Object) <<(name)
9 10 11 |
# File 'lib/fsr/app/fifo.rb', line 9 def self.<<(name) new(name) end |
+ (Object) >>(name)
13 14 15 |
# File 'lib/fsr/app/fifo.rb', line 13 def self.>>(name) new(name, "out", :wait => true) end |
Instance Method Details
- (Object) arguments
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 |