Module: DataBindings::Adapters::Native

Defined in:
lib/data_bindings/adapters/native.rb

Defined Under Namespace

Classes: NativeAdapter

Instance Method Summary collapse

Instance Method Details

#from_native(obj) ⇒ NativeArrayAdapter, NativeObjectAdapter

Constructs a wrapped object from a native Ruby object. This object is expected to respond to calls similar to those defined by #attr_accessor

Parameters:

  • obj (Object)

    The object to be wrapped

Returns:

  • (NativeArrayAdapter, NativeObjectAdapter)

    The wrapped object



8
9
10
# File 'lib/data_bindings/adapters/native.rb', line 8

def from_native(obj)
  binding_class(NativeAdapter).new(self, obj)
end