A summary of data about the Ruby ecosystem.

https://github.com/apotonick/declarative-option

Dynamic Options to evaluate at runtime.
https://github.com/apotonick/declarative-option

Keywords from Contributors

json-parser json-serialization xml-parser xml-serialization

Last synced: about 7 hours ago
JSON representation

Repository metadata

Dynamic Options to evaluate at runtime.

README.md

Declarative::Option

Dynamic options to evaluate at runtime.

Installation

Gem Version
Build Status

Add this line to your application's Gemfile:

gem 'declarative-option'

Runs with Ruby >= 1.9.3.

See travis for JRuby and Rubinius current status.

Option

Pass any value to Option, it will wrap it accordingly and make it executable, so you can call the value at runtime to evaluate it.

It works with static values.

option = Declarative::Option(false)
option.(context, *args) #=> false

When passing in a :symbol, this will be treated as a method that's called on the context. The context is the first argument to Option#call.

option = Declarative::Option(:object_id)
option.(Object.new, *args) #=> 2354383

Same with objects marked with Callable.

class CallMe
  include Declarative::Callable

  def call(context, *args)
    puts "hello!"
  end
end

option = Declarative::Option(Callable.new) #=> "hello!"

And of course, with lambdas.

option = Declarative::Option( ->(context, *args) { puts "yo!" } )
option.(context) #=> yo!

All call arguments behind the first are passed to the wrapped value.

License

Copyright (c) 2017 by Nick Sutterer apotonick@gmail.com

Uber is released under the MIT License.


Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: about 17 hours ago

Total Commits: 24
Total Committers: 3
Avg Commits per committer: 8.0
Development Distribution Score (DDS): 0.417

Commits in past year: 0
Committers in past year: 0
Avg Commits per committer in past year: 0.0
Development Distribution Score (DDS) in past year: 0.0

Name Email Commits
Nick Sutterer a****k@g****m 14
Abinoam P. Marques Jr a****m@g****m 7
Yogesh Khater y****9@g****m 3

Issue and Pull Request metadata

Last synced: 6 days ago

Total issues: 3
Total pull requests: 4
Average time to close issues: N/A
Average time to close pull requests: 13 days
Total issue authors: 3
Total pull request authors: 3
Average comments per issue: 4.67
Average comments per pull request: 1.0
Merged pull request: 3
Bot issues: 0
Bot pull requests: 0

Past year issues: 0
Past year pull requests: 0
Past year average time to close issues: N/A
Past year average time to close pull requests: N/A
Past year issue authors: 0
Past year pull request authors: 0
Past year average comments per issue: 0
Past year average comments per pull request: 0
Past year merged pull request: 0
Past year bot issues: 0
Past year bot pull requests: 0

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/apotonick/declarative-option

Top Issue Authors

  • beruic (1)
  • silviusimeria (1)
  • ibexcrm-dev (1)

Top Pull Request Authors

  • yogeshjain999 (2)
  • abinoam (1)
  • hieuk09 (1)

Top Issue Labels

Top Pull Request Labels


Package metadata

gem.coop: declarative-option

Dynamic options.

  • Homepage: https://github.com/apotonick/declarative-option
  • Documentation: http://www.rubydoc.info/gems/declarative-option/
  • Licenses: MIT
  • Latest release: 0.1.0 (published about 9 years ago)
  • Last Synced: 2026-03-03T05:31:52.435Z (about 12 hours ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 118,657,596 Total
  • Docker Downloads: 416,537,387
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 0.142%
    • Downloads: 0.203%
    • Docker downloads count: 0.363%
  • Maintainers (1)
rubygems.org: declarative-option

Dynamic options.

  • Homepage: https://github.com/apotonick/declarative-option
  • Documentation: http://www.rubydoc.info/gems/declarative-option/
  • Licenses: MIT
  • Latest release: 0.1.0 (published about 9 years ago)
  • Last Synced: 2026-03-01T10:01:38.081Z (2 days ago)
  • Versions: 1
  • Dependent Packages: 4
  • Dependent Repositories: 18,146
  • Downloads: 118,643,032 Total
  • Docker Downloads: 416,537,387
  • Rankings:
    • Downloads: 0.153%
    • Dependent repos count: 0.265%
    • Docker downloads count: 0.444%
    • Dependent packages count: 3.283%
    • Average: 5.588%
    • Forks count: 11.098%
    • Stargazers count: 18.283%
  • Maintainers (1)
debian-10: ruby-declarative-option

  • Homepage: https://github.com/apotonick/declarative-option
  • Documentation: https://packages.debian.org/buster/ruby-declarative-option
  • Licenses:
  • Latest release: 0.1.0-1 (published 20 days ago)
  • Last Synced: 2026-02-13T04:20:36.394Z (19 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
ubuntu-24.04: ruby-declarative-option

  • Homepage: https://github.com/apotonick/declarative-option
  • Licenses:
  • Latest release: 0.1.0-1.1 (published 25 days ago)
  • Last Synced: 2026-02-06T15:04:15.614Z (25 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
ubuntu-23.04: ruby-declarative-option

  • Homepage: https://github.com/apotonick/declarative-option
  • Licenses:
  • Latest release: 0.1.0-1.1 (published 20 days ago)
  • Last Synced: 2026-02-11T06:37:53.430Z (20 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
ubuntu-20.04: ruby-declarative-option

  • Homepage: https://github.com/apotonick/declarative-option
  • Licenses: mit
  • Latest release: 0.1.0-1 (published 18 days ago)
  • Last Synced: 2026-02-13T07:12:21.430Z (18 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
ubuntu-23.10: ruby-declarative-option

  • Homepage: https://github.com/apotonick/declarative-option
  • Licenses:
  • Latest release: 0.1.0-1.1 (published 18 days ago)
  • Last Synced: 2026-02-13T18:17:55.216Z (18 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
ubuntu-24.10: ruby-declarative-option

  • Homepage: https://github.com/apotonick/declarative-option
  • Licenses:
  • Latest release: 0.1.0-1.1ubuntu1 (published 22 days ago)
  • Last Synced: 2026-02-09T16:23:52.462Z (22 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
debian-11: ruby-declarative-option

  • Homepage: https://github.com/apotonick/declarative-option
  • Documentation: https://packages.debian.org/bullseye/ruby-declarative-option
  • Licenses:
  • Latest release: 0.1.0-1.1 (published 21 days ago)
  • Last Synced: 2026-02-13T08:19:23.799Z (18 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
debian-12: ruby-declarative-option

  • Homepage: https://github.com/apotonick/declarative-option
  • Documentation: https://packages.debian.org/bookworm/ruby-declarative-option
  • Licenses:
  • Latest release: 0.1.0-1.1 (published 19 days ago)
  • Last Synced: 2026-02-12T23:28:02.880Z (19 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
ubuntu-22.04: ruby-declarative-option

  • Homepage: https://github.com/apotonick/declarative-option
  • Licenses:
  • Latest release: 0.1.0-1.1 (published 18 days ago)
  • Last Synced: 2026-02-13T13:15:09.775Z (18 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
debian-13: ruby-declarative-option

  • Homepage: https://github.com/apotonick/declarative-option
  • Documentation: https://packages.debian.org/trixie/ruby-declarative-option
  • Licenses:
  • Latest release: 0.1.0-2 (published 19 days ago)
  • Last Synced: 2026-02-13T13:14:35.533Z (18 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%

Dependencies

declarative-option.gemspec rubygems
  • benchmark-ips >= 0 development
  • minitest >= 0 development
  • minitest-line >= 0 development
  • rake >= 0 development

Score: 24.19249036086245