Class: Rupy::PyEnumerable

Inherits:
RubyPyProxy show all
Includes:
Enumerable
Defined in:
lib/rupy/rubypyproxy.rb

Instance Attribute Summary

Attributes inherited from RubyPyProxy

#pObject

Instance Method Summary collapse

Methods inherited from RubyPyProxy

#_wrap, #initialize, #inspect, #is_real_method?, #method_missing, #methods, #respond_to?, #rubify, #to_a, #to_enum, #to_s

Methods included from Operators

#<=>, #[], #[]=, bin_op, #include?, operator_, rel_op, unary_op

Methods inherited from BlankObject

hide

Constructor Details

This class inherits a constructor from Rupy::RubyPyProxy

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Rupy::RubyPyProxy

Instance Method Details

#eachObject



226
227
228
229
230
231
232
233
234
235
# File 'lib/rupy/rubypyproxy.rb', line 226

def each
    iter = self.__iter__
    while true
        begin
            yield iter.next
        rescue Rupy::PythonError => exc
            return if exc.message =~ /StopIteration/
        end
    end
end