Class: JSH::Commands

Inherits:
Pair
  • Object
show all
Defined in:
lib/jsh/commands.rb

Constant Summary collapse

DEFAULT_COMMANDS =
{}

Instance Attribute Summary

Attributes inherited from Pair

#data

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Pair

#[], #[]=, #all, #initialize

Constructor Details

This class inherits a constructor from JSH::Pair

Class Method Details

.register(key, &block) ⇒ Object



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

def self.register(key, &block)
  DEFAULT_COMMANDS[key] = block
end

Instance Method Details

#default_dataObject



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

def default_data
  DEFAULT_COMMANDS
end