Class: Symbol

Inherits:
Object
  • Object
show all
Includes:
Rupture::Fn, Rupture::Lookup
Defined in:
lib/rupture/symbol.rb,
lib/rupture/fn.rb,
lib/rupture/lookup.rb

Overview

Use for keywords

Instance Method Summary collapse

Methods included from Rupture::Lookup

#lookup

Methods included from Rupture::Fn

#comp, #complement, #partial, #to_proc

Instance Method Details

#arityObject



58
59
60
# File 'lib/rupture/fn.rb', line 58

def arity
  -2
end

#call(object = nil, *args) ⇒ Object Also known as: []



53
54
55
# File 'lib/rupture/fn.rb', line 53

def call(object = nil, *args)
  object.method(self)[*args]
end

#nameObject



16
17
18
19
# File 'lib/rupture/symbol.rb', line 16

def name
  parse_namespace unless @name
  @name
end

#namespaceObject



21
22
23
24
# File 'lib/rupture/symbol.rb', line 21

def namespace
  parse_namespace unless @name
  @namespace
end