# Secret (/docs/ruby-sdk/secret)

## Secret [#secret]

Initialize secret from DTO

### Constructors [#constructors]

#### new Secret() [#new-secret]

```ruby
def initialize(secret_dto)

```

Initialize secret from DTO

The plaintext value is write-only and is never returned by the API, so it is not exposed here.

**Parameters**:

- `secret_dto` _DaytonaApiClient:Secret_ -

**Returns**:

- `Secret` - a new instance of Secret

### Methods [#methods]

#### id() [#id]

```ruby
def id()

```

**Returns**:

- `String`

#### name() [#name]

```ruby
def name()

```

**Returns**:

- `String`

#### description() [#description]

```ruby
def description()

```

**Returns**:

- `String, nil`

#### placeholder() [#placeholder]

```ruby
def placeholder()

```

**Returns**:

- `String` - Opaque placeholder token injected as the env var value in Sandboxes. The
placeholder is resolved to the real plaintext value only for the secret's allowed hosts.

#### hosts() [#hosts]

```ruby
def hosts()

```

**Returns**:

- `Array\<String\>` - Allowed hosts this secret may be sent to. Accepts exact hostnames
and +*.+ wildcards (no ports).

#### created_at() [#created_at]

```ruby
def created_at()

```

**Returns**:

- `String`

#### updated_at() [#updated_at]

```ruby
def updated_at()

```

**Returns**:

- `String`
