#Model

DESCRIPTION

[![Build Status](https://api.travis-ci.org/edenjs/model.png)](https://travis-ci.org/edenjs/model)

## General

### Installation

```
npm install eden-model
```

### Usage

```
var model = require('eden-model');
```

## Methods

  * [set](#set)

  * [get](#get)

  * [copy](#copy)

---

<a name="set"></a>

### set

```
 object set({ name: 'chris', age: 32 });
```

Set the raw data hash

#### Parameters

  1. chris - object (string | character | integer | date) to be set

#### Returns

 object

#### Example

##### Code

```
model({ name: 'chris', age: 32 }).setAge(45).getAge();
```

##### Outputs

```
45
```

---

<a name="get"></a>

### get

```
 object get('john');
```

Return a copy of the raw data hash

#### Parameters

  1. 'john' - object (string | character | integer | date) to get

#### Returns

 object

#### Example

##### Code

```
	var user = model({ name: 'chris', age: 32 });
	user.name = 'john';

user.getName();
```

##### Outputs

```
'john'
```

---

<a name="copy"></a>

### copy

```
 Eden_Model copy(name, nickname);
```

Copies a value of source key to destination key.

#### Parameters

  1. name - string (to copy)

  2. nickname - string (copy value from name)

#### Returns

 Eden_Model

#### Example

##### Code

```
	var user = model({ name : 'chris', age : 32 }).copy('name', 'nickname');

user.nickname;
```

##### Outputs

```
'chris'
```
