Class: RubyPython::Tuple

Inherits:
Array
  • Object
show all
Defined in:
lib/rubypython/tuple.rb

Overview

A subclass of ::Array that will convert to a Python Tuple automatically.

Class Method Summary collapse

Class Method Details

.tuple(array) ⇒ Object



4
5
6
7
8
# File 'lib/rubypython/tuple.rb', line 4

def self.tuple(array)
  value = self.new
  value.replace(array.dup)
  value
end