Module: Alf::Facade

Included in:
Alf
Defined in:
lib/alf-core/facade.rb

Instance Method Summary collapse

Instance Method Details

#connect(*args, &bl) ⇒ Object



8
9
10
# File 'lib/alf-core/facade.rb', line 8

def connect(*args, &bl)
  Alf::Database.connect(*args, &bl)
end

#database(*args, &bl) ⇒ Object



4
5
6
# File 'lib/alf-core/facade.rb', line 4

def database(*args, &bl)
  Alf::Database.new(*args, &bl)
end

#examples(&bl) ⇒ Object



12
13
14
# File 'lib/alf-core/facade.rb', line 12

def examples(&bl)
  Alf::Database.connect Path.backfind('examples/suppliers_and_parts'), &bl
end

#Heading(*args, &bl) ⇒ Object



30
31
32
# File 'lib/alf-core/facade.rb', line 30

def Heading(*args, &bl)
  Alf::Heading.coerce(*args, &bl)
end

#reader(source, *args) ⇒ Object



16
17
18
# File 'lib/alf-core/facade.rb', line 16

def reader(source, *args)
  Alf::Reader.reader(source, *args)
end

#Relation(*args, &bl) ⇒ Object



20
21
22
# File 'lib/alf-core/facade.rb', line 20

def Relation(*args, &bl)
  Alf::Relation.coerce(*args, &bl)
end

#Tuple(*args, &bl) ⇒ Object



24
25
26
27
28
# File 'lib/alf-core/facade.rb', line 24

def Tuple(*args, &bl)
  tuple = Alf::Tuple.coerce(*args)
  tuple = tuple.remap(&bl) if bl
  tuple
end