Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

shellable

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shellable

  • 0.0.4
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Shellable Build Status Gem Version

Open a REPL within the context of any Ruby object. Originally written for the TimeBoss gem.

Installation

Add this line to your application's Gemfile:

# update with the version of your choice
gem 'shellable'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install shellable

Usage

Imagine you're building a new Ruby library, and you'd like to provide users with a way to experiment with that new library from the inside. When developing the TimeBoss gem, I wanted to create a Rake task to do just that.

require 'timeboss/calendars'

calendar = TimeBoss::Calendars[:broadcast]
# => #<TimeBoss::Calendars::Broadcast:0x007fea08a40408 @basis=TimeBoss::Calendars::Broadcast::Basis>

Once the desired target object for our REPL has been created, we can simply make it "shellable":

require 'shellable'
Shellable.open(calendar)

To check out a real-life example, head over to the TimeBoss timeboss:calendars:*:repl task definition.

$ rake timeboss:calendars:broadcast:repl
2.4.1 :001 > this_week
 => #<TimeBoss::Calendar::Week start_date=2020-08-10, end_date=2020-08-16>
2.4.1 :002 > parse('2020Q4..2021Q2')
 => #<TimeBoss::Calendar::Period[#<TimeBoss::Calendar::Quarter start_date=2020-09-28, end_date=2020-12-27>..#<TimeBoss::Calendar::Quarter start_date=2021-03-29, end_date=2021-06-27>] start_date=2020-09-28, end_date=2021-06-27>
2.4.1 :003 >

Problems?

Please submit an issue. We'll figure out how to get you up and running with Shellable as smoothly as possible.

FAQs

Package last updated on 18 Jan 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc