module Scribble
Constants
- VERSION
Public Class Methods
converter(from_to, &block)
click to toggle source
# File lib/scribble/converter.rb, line 2 def self.converter from_to, &block Object.new.tap do |converter| converter.define_singleton_method(:from) { from_to.keys.first } converter.define_singleton_method(:to) { from_to.values.first } converter.define_singleton_method :convert, &block end end