Bonanza Workspace is a tool for calling methods in Ruby module directly from command line.
This gem is only a framework, you should extend it with your own business logic.
Note: The tool is currently under hard development.
- Calling a simple method
- Calling method with parameters
- Nested modules
- Derivation
module Make
include BW::Base
def snapshot
puts "Here is the snapshot logic"
end
end
$ bw make snapshot
module Calculator
include BW::Base
def sum(arg1, arg2)
return arg1 + arg2
end
end
$ bw Calculator sum 1 2
module Create
include BW::Base
module Release
def snapshot(product_name)
puts "Creating snapshot is started..."
end
end
end
$ bw Create Release snapshot check.it
module Create
include BW::Base
def version
"1.0"
end
module Release
end
end
$ bw Create Release version => 1.0
Add this line to your application's Gemfile:
gem 'bw'
And then execute:
$ bundle
Or install it yourself as:
$ gem install bw
And then add these lines to your code:
require "rubygems" require "bw"