Module: Enumerable
- Included in:
- Scaruby::Seq
- Defined in:
- lib/scaruby/converter.rb,
lib/scaruby/core_ext/enumerable.rb
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
6
7
8
9
10
11
12
13
|
# File 'lib/scaruby/core_ext/enumerable.rb', line 6
def method_missing(name, *args, &block)
result = Scaruby::Seq.new(self).send(name, *args, &block)
if result.is_a?(Scaruby::Seq)
result.to_a
else
result
end
end
|
Instance Method Details
#to_scaruby ⇒ Object
7
8
9
|
# File 'lib/scaruby/converter.rb', line 7
def to_scaruby
Scaruby::Seq.new(self)
end
|