What you want is usually called ORM: Object-Relational Mapping, which
is a way to map data from a database into objects in a programming
language. In Ruby there are several implementations, you should check
some of them and choose one that suits your project. The most popular
ones (as perceived by me are ActiveRecord, Sequel and DataMapper.
You can use google to find documentation about those.
What you want is usually called ORM: Object-Relational Mapping, which
is a way to map data from a database into objects in a programming
language. In Ruby there are several implementations, you should check
some of them and choose one that suits your project. The most popular
ones (as perceived by me are ActiveRecord, Sequel and DataMapper.
You can use google to find documentation about those.
Hope this helps,
Jesus.
thanks for your answer. i dont know if i have good defined my problem:
i have a separat program which calls inpatient.rb. and here is my class
inpatient, that should take data from database. is the mapping with orm
here right?
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.