class Fx::CommandRecorder::Arguments
Public Class Methods
new(args)
click to toggle source
# File lib/fx/command_recorder.rb, line 66 def initialize(args) @args = args.freeze end
Public Instance Methods
function()
click to toggle source
# File lib/fx/command_recorder.rb, line 70 def function @args[0] end
invert_version()
click to toggle source
# File lib/fx/command_recorder.rb, line 82 def invert_version Arguments.new([function, options_for_revert]) end
revert_to_version()
click to toggle source
# File lib/fx/command_recorder.rb, line 78 def revert_to_version options[:revert_to_version] end
to_a()
click to toggle source
# File lib/fx/command_recorder.rb, line 86 def to_a @args.to_a end
version()
click to toggle source
# File lib/fx/command_recorder.rb, line 74 def version options[:version] end
Private Instance Methods
options()
click to toggle source
# File lib/fx/command_recorder.rb, line 92 def options @options ||= @args[1] || {} end
options_for_revert()
click to toggle source
# File lib/fx/command_recorder.rb, line 96 def options_for_revert options.clone.tap do |revert_options| revert_options[:version] = revert_to_version revert_options.delete(:revert_to_version) end end