Sha256: 40783f0ba79f947075d33b98a3c6104db63fb044a8deb8bb46f3d73d5694732c

Contents?: true

Size: 600 Bytes

Versions: 4

Compression:

Stored size: 600 Bytes

Contents

require 'kangaroo/ruby_adapter/class_definition'
require 'kangaroo/ruby_adapter/fields'

module Kangaroo
  module RubyAdapter
    class Base
      include ClassDefinition
      include Fields
      
      attr_accessor :oo_model, :root_namespace

      def initialize model
        @oo_model = model
        @root_namespace = model.class.namespace
      end

      # Adapt the OpenERP model to ruby
      #
      # return [Class] A Kangaroo::Model::Base subclass representing the OpenERP model
      def to_ruby
        define_class
        add_fields

        @ruby_model
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
kangaroo-0.0.3 lib/kangaroo/ruby_adapter/base.rb
kangaroo-0.0.2 lib/kangaroo/ruby_adapter/base.rb
kangaroo-0.0.1.pre2 lib/kangaroo/ruby_adapter/base.rb
kangaroo-0.0.1.pre lib/kangaroo/ruby_adapter/base.rb