Class: RoadForest::Graph::NullFocus
- Inherits:
-
BasicObject
- Defined in:
- lib/roadforest/graph/graph-focus.rb
Instance Method Summary
collapse
Constructor Details
#initialize(focus, pattern, callsite) ⇒ NullFocus
Returns a new instance of NullFocus.
10
11
12
|
# File 'lib/roadforest/graph/graph-focus.rb', line 10
def initialize(focus, pattern, callsite)
@focus, @pattern, @callsite = focus, pattern, callsite
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
40
41
42
43
44
|
# File 'lib/roadforest/graph/graph-focus.rb', line 40
def method_missing(method, *args, &block)
::Kernel.raise ::NoMethodError, "No method '#{method}' on NullFocus. " +
"NullFocus returned because there were no results at \n#{@focus.subject}\n for \n#{@pattern.inspect}\n" +
"Search was attempted at #{@callsite[0]}"
end
|
Instance Method Details
#__callsite__ ⇒ Object
14
15
16
|
# File 'lib/roadforest/graph/graph-focus.rb', line 14
def __callsite__
@callsite
end
|
#blank? ⇒ Boolean
26
27
28
|
# File 'lib/roadforest/graph/graph-focus.rb', line 26
def blank?
true
end
|
#empty? ⇒ Boolean
30
31
32
|
# File 'lib/roadforest/graph/graph-focus.rb', line 30
def empty?
true
end
|
#length ⇒ Object
Also known as:
count, size
34
35
36
|
# File 'lib/roadforest/graph/graph-focus.rb', line 34
def length
0
end
|
#nil? ⇒ Boolean
22
23
24
|
# File 'lib/roadforest/graph/graph-focus.rb', line 22
def nil?
true
end
|
#subject ⇒ Object
18
19
20
|
# File 'lib/roadforest/graph/graph-focus.rb', line 18
def subject
@focus.subject
end
|