Class: Hodor::Command
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
-
.inherited(base) ⇒ Object
:nodoc:.
Instance Method Summary collapse
Class Method Details
.inherited(base) ⇒ Object
:nodoc:
144 145 146 |
# File 'lib/hodor/command.rb', line 144 def inherited(base) #:nodoc: base.send :extend, ClassMethods end |
Instance Method Details
#topic(title) ⇒ Object
131 132 133 |
# File 'lib/hodor/command.rb', line 131 def topic(title) say self.class.load_topic(title) end |
#topics ⇒ Object
136 137 138 139 140 141 |
# File 'lib/hodor/command.rb', line 136 def topics say "The following topics (in no particular order) are available within the namespace:" load_topics.each_with_index { |topic, i| say " Topic: #{File.basename(topic).sub(/.txt$/, '')}" } end |