Sha256: 380b296a50f83fbbd27e965867cb1b745e96a4c990add39b08360bd503e61816

Contents?: true

Size: 878 Bytes

Versions: 10

Compression:

Stored size: 878 Bytes

Contents

[<< back](../README.md)

1. [Description](#description)
2. [Usage](#usage)
3. [Examples](#examples)

## Description

`get` read param value from configuration file.

## Usage

```ruby
get(PARAM)
```

## Examples

**Reading example**: Suppose we have this `config.yaml` content:

```yaml
---
:global:
  :host1_username: root
  :host1_password: secret
:cases:
- :tt_members: Obiwan
  :host1_ip: 192.168.1.201
  :host1_hostname: jedis
  :username: obiwan
```

Supossing we are **case 01**, then:
* `get(:username)` returns `obiwan`.
* `get(:host1_username)`, returns `root`.

**Writting example**: We also can create new temporal params:

```ruby
set(:greet, "Hello")
var = get(:greet)
```

So `var` value is "Hello".

**Simpler reading example**: Other ways or reading param values:

```ruby
var = greet?
```

So `var` value is "Hello" too. `greet?` is an alias of `get(:greet)`.

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
teuton-2.3.6 docs/dsl/setting/get.md
teuton-2.3.5 docs/dsl/setting/get.md
teuton-2.3.4 docs/dsl/setting/get.md
teuton-2.3.3 docs/dsl/setting/get.md
teuton-2.3.2 docs/dsl/setting/get.md
teuton-2.3.1 docs/dsl/setting/get.md
teuton-2.2.2 docs/dsl/setting/get.md
teuton-2.1.11 docs/dsl/setting/get.md
teuton-2.1.10 docs/dsl/setting/get.md
teuton-2.1.9 docs/dsl/setting/get.md