Class: GrimReaper::GoModule
- Inherits:
-
Object
- Object
- GrimReaper::GoModule
- Defined in:
- lib/grim_reaper/go_module.rb
Overview
Go module wrapper for go_grim operations
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#grim_root ⇒ Object
readonly
Returns the value of attribute grim_root.
Instance Method Summary collapse
- #execute(command, *args) ⇒ Object
-
#initialize(config, grim_root) ⇒ GoModule
constructor
A new instance of GoModule.
- #status ⇒ Object
Constructor Details
#initialize(config, grim_root) ⇒ GoModule
10 11 12 13 |
# File 'lib/grim_reaper/go_module.rb', line 10 def initialize(config, grim_root) @config = config @grim_root = grim_root end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
8 9 10 |
# File 'lib/grim_reaper/go_module.rb', line 8 def config @config end |
#grim_root ⇒ Object (readonly)
Returns the value of attribute grim_root.
8 9 10 |
# File 'lib/grim_reaper/go_module.rb', line 8 def grim_root @grim_root end |
Instance Method Details
#execute(command, *args) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/grim_reaper/go_module.rb', line 15 def execute(command, *args) case command when "compress" execute_compress(*args) when "decompress" execute_decompress(*args) when "build" execute_build(*args) when "test" execute_test(*args) when "benchmark" execute_benchmark(*args) else execute_generic(command, *args) end end |
#status ⇒ Object
32 33 34 35 36 37 38 39 |
# File 'lib/grim_reaper/go_module.rb', line 32 def status { status: "ready", module: "go", available_commands: %w[compress decompress build test benchmark], grim_root: @grim_root } end |