Sha256: 01b72a52159a66cb955511f2adcb47ef38b35fa452bb0b3809dee0617359e2cc

Contents?: true

Size: 386 Bytes

Versions: 12

Compression:

Stored size: 386 Bytes

Contents

Use `let` helper to add virtial memoized attributes to the scope/operation.

```ruby
class CatsAPI < Evil::Client
  option :version, default: proc { 0 }
  option :release, default: proc { 1 }

  let(:full_version) { [version, release].join(".") } # "0.1" by default
end
```

These virtual attributes are available inside all block declarations, including [validations].

[validations]:

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
evil-client-3.2.0 docs/helpers/let.md
evil-client-3.1.0 docs/helpers/let.md
evil-client-3.0.4 docs/helpers/let.md
evil-client-3.0.3 docs/helpers/let.md
evil-client-3.0.2 docs/helpers/let.md
evil-client-3.0.1 docs/helpers/let.md
evil-client-3.0.0 docs/helpers/let.md
evil-client-2.1.1 docs/helpers/let.md
evil-client-2.1.0 docs/helpers/let.md
evil-client-2.0.0 docs/helpers/let.md
evil-client-1.1.0 docs/helpers/let.md
evil-client-1.0.0 docs/helpers/let.md