Class: CommandTree::Group

Inherits:
Object
  • Object
show all
Defined in:
lib/command_tree/group.rb

Overview

A group of commands

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(prefix, name, options = {}) ⇒ Group

Returns a new instance of Group.



6
7
8
9
10
# File 'lib/command_tree/group.rb', line 6

def initialize(prefix, name, options = {})
  @prefix = prefix
  @name = name
  @desc = options[:desc]
end

Instance Attribute Details

#descObject (readonly)

Returns the value of attribute desc.



4
5
6
# File 'lib/command_tree/group.rb', line 4

def desc
  @desc
end

#nameObject (readonly)

Returns the value of attribute name.



4
5
6
# File 'lib/command_tree/group.rb', line 4

def name
  @name
end

#prefixObject (readonly)

Returns the value of attribute prefix.



4
5
6
# File 'lib/command_tree/group.rb', line 4

def prefix
  @prefix
end

Instance Method Details

#executeObject



12
13
14
# File 'lib/command_tree/group.rb', line 12

def execute
  print_banner
end