Sha256: f3e73141542c1f6d53ff457e19a253cb5ff4aea0d94f288c3f967944c5983e8f
Contents?: true
Size: 563 Bytes
Versions: 24
Compression:
Stored size: 563 Bytes
Contents
class Kea::ServiceGenerator < Rails::Generators::NamedBase source_root File.expand_path('../templates', __FILE__) argument :namespace, type: :string, required: false, default: nil def install_templates template "service.js.erb", namespaced_path("app/assets/javascripts", "services/#{name.underscore}.js") end private def namespaced_path(path, suffix = nil) app_namespace = case namespace when 'none', nil nil else namespace.underscore end File.join [path, app_namespace, suffix].compact end end
Version data entries
24 entries across 24 versions & 1 rubygems