Sha256: d11e5288c35505b32dc2dd966f9f8446f56bee0fa7162099e6597a5760a86920
Contents?: true
Size: 483 Bytes
Versions: 3
Compression:
Stored size: 483 Bytes
Contents
# frozen_string_literal: true module Ragent module CommandHelpers def command(*commands) @prepared_commands = [] commands.each do |command| prep_command = { main: plugin_name, # name of the plugin sub: command, method: "command_#{command}" } @prepared_commands << prep_command end end def prepared_commands @prepared_commands || [] end alias commands command end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
ragent-0.0.6 | lib/ragent/command_helpers.rb |
ragent-0.0.5 | lib/ragent/command_helpers.rb |
ragent-0.0.4 | lib/ragent/command_helpers.rb |