Sha256: fa3ba343bab73a9e8d202898da3f0566ea4cc3e11a14249194a185db0b5cd3f7
Contents?: true
Size: 1.41 KB
Versions: 2
Compression:
Stored size: 1.41 KB
Contents
module Rails3::Assist module BaseHelper def self.included(base) base.extend ClassMethods base.class_eval do include Rails3::Assist::App # include ::Thor::Actions end end module ClassMethods def multi_aliases_for name multi_alias :_after_ => name, :create => :new, :insert_into => [:inject_into, :update], :read => :X_content, :remove => :delete end end protected def get_type options = {} case options when Hash raise ArgumentError, "No artifact type specified #{options}" if !options[:type] options[:type].to_sym when String, Symbol options.to_sym else raise ArgumentError, "Bad artifact type specified #{options}" end end def debug? Rails3::Assist.debug_on end def debug msg puts msg if debug? end def set options, type options.merge!(:type => type) options end def orm_notify '' end def marker_option name, options={} type = last_option(options)[:type] marker_content = if type method = :"#{type}_marker" orm_marker = send method, name, options if respond_to? method else name.to_s.camelize end options[:before] ? {:before => marker_content} : {:after => marker_content} end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rails3_artifactor-0.4.0 | lib/rails3_artifactor/artifact/base.rb |
rails3_artifactor-0.3.2 | lib/rails3_artifactor/artifact/base.rb |