Class: Erlang::Export

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(mod, function, arity) ⇒ Export

Returns a new instance of Export.



5
6
7
8
9
# File 'lib/erlang/export.rb', line 5

def initialize(mod, function, arity)
  self.mod      = mod
  self.function = function
  self.arity    = arity
end

Instance Attribute Details

#arityObject

Returns the value of attribute arity.



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

def arity
  @arity
end

#functionObject

Returns the value of attribute function.



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

def function
  @function
end

#modObject

Returns the value of attribute mod.



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

def mod
  @mod
end

Instance Method Details

#==(other) ⇒ Object



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

def ==(other)
  self.class === other &&
  mod.to_s      == other.mod.to_s &&
  function.to_s == other.function.to_s &&
  arity         == other.arity
end

#inspectString

Returns the nicely formatted version of the message.

Returns:

  • (String)

    the nicely formatted version of the message



12
13
14
# File 'lib/erlang/export.rb', line 12

def inspect
  "#<#{self.class.name} fun #{mod}:#{function}/#{arity}>"
end