# Source: https://www.daytona.io/docs/en/ruby-sdk/volume-service.md

## VolumeService

Service for managing Daytona Volumes. Can be used to list, get, create and delete Volumes.

### Constructors

#### new VolumeService()

```ruby
def initialize(volumes_api)

```

Service for managing Daytona Volumes. Can be used to list, get, create and delete Volumes.

**Parameters**:

- `volumes_api` _DaytonaApiClient:VolumesApi_ -

**Returns**:

- `VolumeService` - a new instance of VolumeService

### Methods

#### create()

```ruby
def create(name)

```

Create new Volume.

**Parameters**:

- `name` _String_ -

**Returns**:

- `Daytona:Volume`

#### delete()

```ruby
def delete(volume)

```

Delete a Volume.

**Parameters**:

- `volume` _Daytona:Volume_ -

**Returns**:

- `void`

#### get()

```ruby
def get(name, create:)

```

Get a Volume by name.

**Parameters**:

- `name` _String_ -
- `create` _Boolean_ -

**Returns**:

- `Daytona:Volume`

#### list()

```ruby
def list()

```

List all Volumes.

**Returns**:

- `Array\<Daytona:Volume\>`