Class: Hanlon::MethodsFinder

Inherits:
Object
  • Object
show all
Defined in:
lib/hanlon/methods_finder.rb

Class Method Summary collapse

Instance Method Summary collapse

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