Module: Polygon

Defined in:
lib/polygon.rb,
lib/polygon/base.rb,
lib/polygon/entry.rb,
lib/polygon/script.rb,
lib/polygon/dialect.rb,
lib/polygon/helpers.rb,
lib/polygon/version.rb,
lib/polygon/database.rb,
lib/polygon/script/gsub.rb,
lib/polygon/script/open.rb

Overview

A web framework powered by sinatra for mostly static websites

Defined Under Namespace

Modules: Database, Helpers, Script, Version Classes: Base, Dialect, Entry

Constant Summary collapse

DEFAULT_OPTIONS =
{ viewpoint: Database }
VERSION =
Version.to_s

Class Method Summary collapse

Class Method Details

.connect(path, options = {}, &bl) ⇒ Object



26
27
28
# File 'lib/polygon.rb', line 26

def self.connect(path, options = {}, &bl)
  database(path, options).connect(&bl)
end

.connection(path, options = {}) ⇒ Object



22
23
24
# File 'lib/polygon.rb', line 22

def self.connection(path, options = {})
  database(path, options).connection
end

.database(path, options = {}) ⇒ Object



17
18
19
20
# File 'lib/polygon.rb', line 17

def self.database(path, options = {})
  options = DEFAULT_OPTIONS.merge(options)
  Alf.database(Database::Adapter.polygon(path), options)
end

.Script(*args) ⇒ Object



43
44
45
46
47
# File 'lib/polygon/script.rb', line 43

def self.Script(*args)
  Quickl::Command(*args) do |builder|
    builder.instance_module Script
  end
end