Sha256: 7c9ef27b76fc17da6cb08811330cf3dbdac403e151d25af4b19a395a4e876361

Contents?: true

Size: 726 Bytes

Versions: 1

Compression:

Stored size: 726 Bytes

Contents

require_relative "myrrha/version"
require_relative "myrrha/loader"
require_relative 'myrrha/errors'
#
# Myrrha -- the missing coercion framework for Ruby
#
module Myrrha

  require_relative 'myrrha/domain'
  require_relative 'myrrha/coercions'

  # Builds a set of coercions rules.
  #
  # Example:
  #
  #   rules = Myrrha.coercions do |c|
  #     c.coercion String, Integer, lambda{|s,t| Integer(s)}
  #     #
  #     # [...]
  #     #
  #     c.fallback String, lambda{|s,t| ... }
  #   end
  #
  def self.coercions(&block)
    Coercions.new(&block)
  end

  # Myrrha main options
  OPTIONS = {
    :core_ext => false
  }

  # Install core extensions?
  def self.core_ext?
    OPTIONS[:core_ext]
  end

end # module Myrrha

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
myrrha-2.0.0 lib/myrrha.rb