Module: Pythonism::Pythonize::Basic
- Defined in:
- lib/pythonism/pythonize/basic.rb
Overview
Provide Basic methods
Instance Method Summary collapse
- #__class__ ⇒ Class
- #__cmp__(other) ⇒ Fixnum
- #__eq__(other) ⇒ Boolean
- #__ge__(other) ⇒ Boolean
- #__gt__(other) ⇒ Boolean
- #__le__(other) ⇒ Boolean
- #__list__ ⇒ Array
- #__lt__(other) ⇒ Boolean
- #__ne__(other) ⇒ Boolean
- #__new__(_object) ⇒ Object
- #__nonzero__ ⇒ Boolean
- #__repr__ ⇒ String
- #__str__ ⇒ String
Instance Method Details
#__class__ ⇒ Class
25 26 27 |
# File 'lib/pythonism/pythonize/basic.rb', line 25 def __class__ self.class end |
#__cmp__(other) ⇒ Fixnum
55 56 57 |
# File 'lib/pythonism/pythonize/basic.rb', line 55 def __cmp__(other) self <=> other end |
#__eq__(other) ⇒ Boolean
40 41 42 |
# File 'lib/pythonism/pythonize/basic.rb', line 40 def __eq__(other) self == other end |
#__ge__(other) ⇒ Boolean
50 51 52 |
# File 'lib/pythonism/pythonize/basic.rb', line 50 def __ge__(other) self >= other end |
#__gt__(other) ⇒ Boolean
45 46 47 |
# File 'lib/pythonism/pythonize/basic.rb', line 45 def __gt__(other) self > other end |
#__le__(other) ⇒ Boolean
35 36 37 |
# File 'lib/pythonism/pythonize/basic.rb', line 35 def __le__(other) self <= other end |
#__lt__(other) ⇒ Boolean
30 31 32 |
# File 'lib/pythonism/pythonize/basic.rb', line 30 def __lt__(other) self < other end |
#__ne__(other) ⇒ Boolean
60 61 62 |
# File 'lib/pythonism/pythonize/basic.rb', line 60 def __ne__(other) self != (other) end |
#__new__(_object) ⇒ Object
5 6 7 |
# File 'lib/pythonism/pythonize/basic.rb', line 5 def __new__(_object) raise TypeError end |
#__nonzero__ ⇒ Boolean
65 66 67 |
# File 'lib/pythonism/pythonize/basic.rb', line 65 def __nonzero__ true end |
#__repr__ ⇒ String
15 16 17 |
# File 'lib/pythonism/pythonize/basic.rb', line 15 def __repr__ inspect end |