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

demisyn

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

demisyn

  • 0.2.2
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Demisyn

Build Status

With demisyn you'll never need to dot your methods again. wink wink

Installation

Add this line to your application's Gemfile:

gem 'demisyn'

And then execute:

$ bundle

Or install it yourself as:

$ gem install demisyn

Usage

Anywhere you want to use this (within Objects) you must first include this in the scope of its use.

using Demisyn

Then you can evaluate strings and arrays of strings as if they were consecutive methods.

###Examples

~"'asdf' reverse split('s') join capitalize"
# => "Fda"
~%w['asdf' reverse split('s') join capitalize]
# => "Fda"

~"'asdf' pikachu split('s') join capitalize"
#NoMethodError: undefined method
~%w['asdf' pikachu split('s') join capitalize]
#NoMethodError: undefined method

Note to execute Demisyn in this fashion you must use the tilde before an Array or String.

####Ruby 2.3.0

Since Ruby 2.3.0 has added the safe navigation operator I've made that available for your method chain. Instead of using tilde before a String or Array use the minus symbol.

-"'asdf' reverse split('s') join capitalize"
# => "Fda"

-"'asdf'[7] reverse split('s') join capitalize"
# => nil

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/danielpclark/demisyn. This project is intended to be a safe, welcoming space for collaboration.

License

Licensed under either of

at your option.

FAQs

Package last updated on 14 Jan 2016

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