Sha256: 17a2872dad53f4845d85b5dd5600e583be7fbb86f7a9e25d4a5ee9fe6c9c5365

Contents?: true

Size: 615 Bytes

Versions: 6

Compression:

Stored size: 615 Bytes

Contents

# coding: utf-8

require_relative 'core_ext/object'

module FlexCoerce
  require_relative 'flex_coerce/flex_proxy'
  require_relative 'flex_coerce/class_methods'
  require_relative 'flex_coerce/module_methods'

  extend FlexCoerce::ModuleMethods

  # Method #FlexProxy is delegated to the host class, it returns the
  # parametrized subclass of FlexCoerce::FlexProxy specific to the host class.
  # 
  def FlexProxy
    self.class.FlexProxy
  end

  # FlexCoerce provides coerce method that returns a proxy object and self.
  # 
  def coerce first_operand
    return FlexProxy().of( first_operand ), self
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
y_support-2.5.3 lib/y_support/flex_coerce.rb
y_support-2.5.2 lib/y_support/flex_coerce.rb
y_support-2.5.1 lib/y_support/flex_coerce.rb
y_support-2.4.6 lib/y_support/flex_coerce.rb
y_support-2.4.5 lib/y_support/flex_coerce.rb
y_support-2.4.4 lib/y_support/flex_coerce.rb