Class: FSR::App::Bridge
- Inherits:
-
Application
- Object
- Application
- FSR::App::Bridge
- Defined in:
- lib/fsr/app/bridge.rb
Instance Attribute Summary (collapse)
-
- (Object) options
readonly
Returns the value of attribute options.
Class Method Summary (collapse)
Instance Method Summary (collapse)
- - (Object) arguments
-
- (Bridge) initialize(*params)
constructor
A new instance of Bridge.
- - (Object) modifiers
- - (Object) raw
Methods inherited from Application
Constructor Details
- (Bridge) initialize(*params)
A new instance of Bridge
8 9 10 11 12 |
# File 'lib/fsr/app/bridge.rb', line 8 def initialize(*params) = params.last.is_a?(Hash) ? params.pop : {} @sequential = .delete(:sequential) @targets = params end |
Instance Attribute Details
- (Object) options (readonly)
Returns the value of attribute options
6 7 8 |
# File 'lib/fsr/app/bridge.rb', line 6 def end |
Class Method Details
+ (Object) execute(target, opts = {})
27 28 29 |
# File 'lib/fsr/app/bridge.rb', line 27 def self.execute(target, opts = {}) self.new(target, opts).raw end |
Instance Method Details
- (Object) arguments
14 15 16 17 |
# File 'lib/fsr/app/bridge.rb', line 14 def arguments delimeter = @sequential ? "|" : "," [@targets.join(delimeter)] end |
- (Object) modifiers
19 20 21 |
# File 'lib/fsr/app/bridge.rb', line 19 def modifiers .map { |k,v| "%s=%s" % [k, v] }.join(",") end |
- (Object) raw
23 24 25 |
# File 'lib/fsr/app/bridge.rb', line 23 def raw "%s({%s}%s)" % [app_name, modifiers, arguments.join(" ")] end |