module Seatbelt

Constants

METHOD_EXCLUDE_DIRECTIVES
VERSION

Public Class Methods

check_directive(directive) click to toggle source

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

directive - the directive String to check.

Returns nothing

# 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| ... } click to toggle source

Public: Configures the Gate. Needs a block.

Example:

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

Returns nothing.

# File lib/seatbelt.rb, line 32
def self.configure_gate
  yield GateConfig if block_given?
end