Sha256: fdb16d0f892ec47d32436959b536c5ae6ee2a483c9adefa87c7fc6cfd073ea99
Contents?: true
Size: 622 Bytes
Versions: 4
Compression:
Stored size: 622 Bytes
Contents
class Gator module ActAsCommand def self.included(base) base.extend(ClassMethods) end module ClassMethods attr_reader :definition, :parent def define(definition) @definition = definition end def parent_command=(klass) @parent = klass end end def parent self.class.parent end def definition self.class.definition end def get_subcommand(*args) nil end def resolve_subcommand(command, fallback=nil) return nil unless parent parent.resolve_subcommand(command, fallback) end end end
Version data entries
4 entries across 4 versions & 1 rubygems