Class: Bracken::Application
- Inherits:
-
Object
- Object
- Bracken::Application
- Defined in:
- lib/bracken/application.rb
Instance Attribute Summary collapse
-
#configuration ⇒ Object
readonly
Returns the value of attribute configuration.
Class Method Summary collapse
Instance Method Summary collapse
- #execute(arguments) ⇒ Object
-
#initialize ⇒ Application
constructor
A new instance of Application.
Constructor Details
#initialize ⇒ Application
Returns a new instance of Application.
9 10 11 |
# File 'lib/bracken/application.rb', line 9 def initialize @configuration = Configuration.new end |
Instance Attribute Details
#configuration ⇒ Object (readonly)
Returns the value of attribute configuration.
7 8 9 |
# File 'lib/bracken/application.rb', line 7 def configuration @configuration end |
Class Method Details
.execute(arguments) ⇒ Object
3 4 5 |
# File 'lib/bracken/application.rb', line 3 def self.execute(arguments) new.execute(arguments) end |
Instance Method Details
#execute(arguments) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/bracken/application.rb', line 13 def execute(arguments) configuration.parse(arguments) while activity = IO.select(configuration.streams) streams = activity.first streams.each do |stream| line = stream.filtered_gets if line STDOUT.puts line STDOUT.flush end end end end |