Module: Seatbelt

Defined in:
lib/seatbelt.rb,
lib/seatbelt/ghost.rb,
lib/seatbelt/version.rb,
lib/seatbelt/document.rb,
lib/seatbelt/core/gate.rb,
lib/seatbelt/core/pool.rb,
lib/seatbelt/tape_deck.rb,
lib/seatbelt/core/proxy.rb,
lib/seatbelt/tapes/tape.rb,
lib/seatbelt/translator.rb,
lib/seatbelt/core/callee.rb,
lib/seatbelt/gate_config.rb,
lib/seatbelt/core/property.rb,
lib/seatbelt/core/terminal.rb,
lib/seatbelt/errors/errors.rb,
lib/seatbelt/core/interface.rb,
lib/seatbelt/core/eigenmethod.rb,
lib/seatbelt/core/ghost_tunnel.rb,
lib/seatbelt/core/lookup_table.rb,
lib/seatbelt/core/implementation.rb,
lib/seatbelt/core/synthesizeable.rb,
lib/seatbelt/tapes/util/delegate.rb,
lib/seatbelt/synthesizers/mongoid.rb,
lib/seatbelt/synthesizers/document.rb,
lib/seatbelt/collections/collection.rb,
lib/seatbelt/core/eigenmethod_proxy.rb,
lib/seatbelt/synthesizers/synthesizer.rb,
lib/seatbelt/core/iterators/method_config.rb

Defined Under Namespace

Modules: Callee, Collections, Core, Document, EigenmethodProxy, Errors, Gate, Ghost, GhostTunnel, Interface, Pool, Property, Synthesizeable, Synthesizer, Synthesizers, TapeDeck, Tapes Classes: Eigenmethod, GateConfig, LookupTable, Proxy, Tape, Terminal, Translator

Constant Summary collapse

METHOD_EXCLUDE_DIRECTIVES =
%w{ :: }
VERSION =
"0.10.0"

Class Method Summary collapse

Class Method Details

.check_directive(directive) ⇒ Object

Internal: Checks a directive if allowed. Raises a DirectiveNotAllowedError if directive is not allowed.

directive - the directive String to check.

Returns nothing



15
16
17
18
19
# File 'lib/seatbelt.rb', line 15

def self.check_directive(directive)
  if directive.in?(METHOD_EXCLUDE_DIRECTIVES)
    raise Seatbelt::Errors::DirectiveNotAllowedError
  end
end

.configure_gate {|GateConfig| ... } ⇒ Object

Public: Configures the Gate. Needs a block.

Example:

Seatbelt.configure_gate do |config|
  config.method_directive_instance  = "|"
  config.method_directive_class     = "~"
end

Returns nothing.

Yields:



32
33
34
# File 'lib/seatbelt.rb', line 32

def self.configure_gate
  yield GateConfig if block_given?
end