Class: Erlang::Tuple

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

Instance Method Summary collapse

Instance Method Details

#arityObject



3
4
5
# File 'lib/erlang/tuple.rb', line 3

def arity
  length
end

#inspectObject



7
8
9
# File 'lib/erlang/tuple.rb', line 7

def inspect
  "#<#{self.class.name} {#{super[1..-2]}}>"
end

#pretty_inspectObject



11
12
13
# File 'lib/erlang/tuple.rb', line 11

def pretty_inspect
  "#<#{self.class.name} #{super[0..-2]}>\n"
end

#pretty_print(q) ⇒ Object



15
16
17
18
19
20
21
# File 'lib/erlang/tuple.rb', line 15

def pretty_print(q)
  q.group(1, '{', '}') {
    q.seplist(self) { |v|
      q.pp v
    }
  }
end