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

shot_libs

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shot_libs

  • 1.0.2
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Introduction

Shot Libs is a series of Loaders which allow you to utilize Helpers and Libraries to outsource controller and app logic.

Installation

gem install shot_libs

Usage Example

require 'shot'
require 'shot_libs'

app = Application.new

app.add_loader HelperLoader
app.add_loader LibraryLoader

app.run do
    app.on 'load' do |instance|
        instance.get 'library', 'SomeLibrary'
    end
end

app.start

Controller Example

application/helpers/email.rb

class Email
    self.send_email(recipient, subject, body)
        # Actually send an email here using the devil's magic of SMTP
    end
end

application/controllers/email.rb

require 'shot_mvc'

class EmailController < Controller
    def setup
        get 'helper', 'Email'
    end

    def send(message)
        Email.send_email message['recipient'], message['subject'], message['body']
    end
end

FAQs

Package last updated on 30 Jun 2013

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