Class: Symbol

Inherits:
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

#<<, #>>, #block, #comp, #complement, #fnil, #partial, #rpartial, #to_proc

Instance Method Details

#arityObject



84
85
86
# File 'lib/rupture/fn.rb', line 84

def arity
  -2
end

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



79
80
81
# File 'lib/rupture/fn.rb', line 79

def call(object, *args, &block)
  object.method(self).call(*args, &block)
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