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

beginner.codes

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

beginner.codes

  • 0.1.7
  • Rubygems
  • Socket score

Version published
Maintainers
2
Created
Source

Beginner.Codes Ruby Gem

This is the un-official Ruby Gem for the Beginner.Codes Discord server.

Running Challenge Tests

  • Install the package: gem install beginner.codes
  • Import the test runner: require 'challenges'
  • Run the tests, passing in the challenge number and your solution function: test(458, :n_differences) for a function or test(458, n_differences) for a lambda function
  • For informatino only you can pass either description: true or examples: true
require 'challenges'

def n_differences(nums)
    nil
end  # Your code goes here!!!

test(458, :n_differences)

# OR You can use a Lambda Proc

n_differences = -> (x) {x*2}

test(458, n_differences)

This will handle downloading the necessary challenge test cases and will run them against your code. It will show you which tests failed, what went wrong, and how many tests succeeded.

Additionally, you can view the description and examples when running the tests by adding some options to the test function

test(458, :n_differences, description: true, examples: true)

FAQs

Package last updated on 14 Nov 2023

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