Class: Hanlon::MethodsFinder
- Inherits:
-
Object
- Object
- Hanlon::MethodsFinder
- Defined in:
- lib/hanlon/methods_finder.rb
Class Method Summary collapse
Instance Method Summary collapse
- #hanlon(name, &block) ⇒ Object
-
#initialize(engine) ⇒ MethodsFinder
constructor
A new instance of MethodsFinder.
- #methods ⇒ Object
Constructor Details
#initialize(engine) ⇒ MethodsFinder
Returns a new instance of MethodsFinder.
7 8 9 10 |
# File 'lib/hanlon/methods_finder.rb', line 7 def initialize engine @methods = [] @engine = engine end |
Class Method Details
.find(engine) ⇒ Object
3 4 5 |
# File 'lib/hanlon/methods_finder.rb', line 3 def self.find engine Hanlon::MethodsFinder.new(engine).methods end |
Instance Method Details
#hanlon(name, &block) ⇒ Object
12 13 14 |
# File 'lib/hanlon/methods_finder.rb', line 12 def hanlon name, &block @methods.push name.to_s end |
#methods ⇒ Object
16 17 18 19 |
# File 'lib/hanlon/methods_finder.rb', line 16 def methods @engine.render(self) @methods end |