Sha256: e0d1850be36887a5aa37d9ca5926ecfe2a6e684ea1658ebac12a3d3aad88fffd

Contents?: true

Size: 728 Bytes

Versions: 8

Compression:

Stored size: 728 Bytes

Contents

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

  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

8 entries across 8 versions & 1 rubygems

Version Path
myrrha-3.0.0 lib/myrrha.rb
myrrha-3.0.0.rc7 lib/myrrha.rb
myrrha-3.0.0.rc6 lib/myrrha.rb
myrrha-3.0.0.rc5 lib/myrrha.rb
myrrha-3.0.0.rc4 lib/myrrha.rb
myrrha-3.0.0.rc3 lib/myrrha.rb
myrrha-3.0.0.rc2 lib/myrrha.rb
myrrha-3.0.0.rc1 lib/myrrha.rb