Socket
Book a DemoInstallSign in
Socket

r_decorator

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

r_decorator

0.0.7
bundlerRubygems
Version published
Maintainers
1
Created
Source

RDecorator

A readable and simple view helper for Rails 3.

Usage

class Person < ActiveRecord::Base
  def say
     "Hey!"
  end
end

class PersonDecorator < RDecorator::Base
  def say
     origin.say * 3
  end
end

person = Person.new
person.say # == "Hey!"
person.decorated.say # == "Hey!Hey!Hey!"

Notice

  • Most code of lib/rdecorator/view_context.rb and rspec files was copied from https://github.com/amatsuda/active_decorator. Copyright (c) 2011 Akira Matsuda under MIT-LICENSE.

  • lig/generators/* was copied from https://github.com/drapergem/draper under MIT-LICENSE.

FAQs

Package last updated on 19 Dec 2012

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.