Class: RubyFly::Commands::Version

Inherits:
Base
  • Object
show all
Defined in:
lib/ruby_fly/commands/version.rb

Instance Attribute Summary

Attributes inherited from Base

#binary, #stderr, #stdin

Instance Method Summary collapse

Methods inherited from Base

#do_around, #execute, #initialize, #instantiate_builder

Constructor Details

This class inherits a constructor from RubyFly::Commands::Base

Instance Method Details

#configure_command(builder, _opts) ⇒ Object



17
18
19
# File 'lib/ruby_fly/commands/version.rb', line 17

def configure_command(builder, _opts)
  builder.with_flag('--version')
end

#do_after(_opts) ⇒ Object



21
22
23
# File 'lib/ruby_fly/commands/version.rb', line 21

def do_after(_opts)
  @version_string.string.gsub(/\n/, '')
end

#do_before(_opts) ⇒ Object



13
14
15
# File 'lib/ruby_fly/commands/version.rb', line 13

def do_before(_opts)
  @version_string = StringIO.new
end

#stdoutObject



9
10
11
# File 'lib/ruby_fly/commands/version.rb', line 9

def stdout
  @version_string
end