Class: Object

Inherits:
BasicObject
Defined in:
lib/alib.rb,
lib/alib-0.5.1.rb,
lib/alib-0.5.1/stdext.rb,
lib/alib-0.5.1/prototype.rb,
lib/alib-0.5.1/attributes.rb,
lib/alib-0.5.1/prototype-0.3.0.rb,
lib/alib-0.5.1/attributes-3.2.0.rb

Constant Summary collapse

Alib =
ALib

Instance Method Summary collapse

Instance Method Details

#alibObject



26
# File 'lib/alib.rb', line 26

def alib() ALib end

#attribute(*a, &b) ⇒ Object



51
# File 'lib/alib-0.5.1/attributes.rb', line 51

def attribute(*a, &b) attributes *a, &b end

#attributes(*a, &b) ⇒ Object



46
47
48
49
# File 'lib/alib-0.5.1/attributes.rb', line 46

def attributes *a, &b
  sc = class << self; self; end
  sc.attributes *a, &b
end

#Prototype(*a, &b) ⇒ Object



196
# File 'lib/alib-0.5.1/prototype.rb', line 196

def Prototype(*a, &b) Prototype.new *a, &b end

#prototype(*a, &b) ⇒ Object



197
# File 'lib/alib-0.5.1/prototype.rb', line 197

def prototype(*a, &b) Prototype.new *a, &b end

#Prototyping(*a, &b) ⇒ Object



198
# File 'lib/alib-0.5.1/prototype.rb', line 198

def Prototyping(*a, &b) Prototype.prototyping self, *a, &b end

#prototyping(*a, &b) ⇒ Object



199
# File 'lib/alib-0.5.1/prototype.rb', line 199

def prototyping(*a, &b) Prototype.prototyping self, *a, &b end

#singleton_class(obj = self, &b) ⇒ Object



2
3
4
5
6
7
8
9
10
11
# File 'lib/alib-0.5.1/stdext.rb', line 2

def singleton_class obj = self, &b
#--{{{
  sc =
    class << obj
      self
    end
  sc.module_eval &b
  sc
#--}}}
end

#tap(&b) ⇒ Object

–}}}



12
13
14
15
16
17
# File 'lib/alib-0.5.1/stdext.rb', line 12

def tap &b
#--{{{
  b.arity == 1 ? yield(self) : instance_eval(&b)
  return self
#--}}}
end