Sha256: 108a5c5e42fcc309945f8c46fdc84556f6a140b0030743214d69f97aa568e27c
Contents?: true
Size: 665 Bytes
Versions: 26
Compression:
Stored size: 665 Bytes
Contents
module Bowline::Generators class BinderGenerator < NamedGenerator desc <<-DESC Generates a new binder, either a collection one, or a singleton one. DESC def class_name super + " < Bowline::Binders::#{type.to_s.camel_case}" end def modules ['Binders'] end first_argument :name, :required => true, :desc => "binder name" option :type, :desc => "Binder type (collection/singleton)", :default => "collection" template :binder do |template| template.source = "binder.rb" template.destination = "app/binders/#{file_name}.rb" end end add :binder, BinderGenerator end
Version data entries
26 entries across 26 versions & 2 rubygems