Class: TestLink::Command::Definition
- Inherits:
-
Object
- Object
- TestLink::Command::Definition
- Defined in:
- lib/test_link/command/definition.rb
Direct Known Subclasses
Constant Summary collapse
- @@arguments =
{}
Class Method Summary collapse
Class Method Details
.argument(name, options = {}) ⇒ Object
23 24 25 26 27 28 29 30 31 |
# File 'lib/test_link/command/definition.rb', line 23 def self.argument name, = {} = { :default => nil, :mandatory => false }.merge() name = name.intern attr_accessor name self.arguments[name] = Argument.new [:default], [:mandatory] end |
.arguments ⇒ Object
33 34 35 36 |
# File 'lib/test_link/command/definition.rb', line 33 def self.arguments @@arguments[self.command_name] = {} if @@arguments[self.command_name].nil? @@arguments[self.command_name] end |
.command_name ⇒ Object
38 39 40 41 42 |
# File 'lib/test_link/command/definition.rb', line 38 def self.command_name classname = self.name.split('::').last classname[0] = classname[0].downcase classname end |