Class: NullObject
- Inherits:
-
Object
show all
- Defined in:
- lib/marky_markov/markov_sentence_generator.rb
Overview
Messing about with the NullObject pattern, can’t apply it in too many places in this one. Need to evaluate what else could be used in this aside from my first instinct of defaulting to []
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(*args, &block) ⇒ Object
6
7
8
|
# File 'lib/marky_markov/markov_sentence_generator.rb', line 6
def method_missing (*args, &block)
self
end
|
Instance Method Details
#<< ⇒ Object
10
|
# File 'lib/marky_markov/markov_sentence_generator.rb', line 10
def <<(*); end
|
#nil? ⇒ Boolean
9
|
# File 'lib/marky_markov/markov_sentence_generator.rb', line 9
def nil?; true; end
|
#to_ary ⇒ Object
12
|
# File 'lib/marky_markov/markov_sentence_generator.rb', line 12
def to_ary; []; end
|
#to_str ⇒ Object
11
|
# File 'lib/marky_markov/markov_sentence_generator.rb', line 11
def to_str; end
|