module Translatable::GeneratorHelper
Public Class Methods
included(base)
click to toggle source
# File lib/translatable/generator_helper.rb, line 3 def self.included(base) base.class_eval do attr_accessor :attributes argument :attrs, type: :array, default: [], banner: "field[:type][:index] field[:type][:index]" end end
Protected Instance Methods
model_exists?()
click to toggle source
# File lib/translatable/generator_helper.rb, line 16 def model_exists? File.exists?(model_path) end
model_path()
click to toggle source
# File lib/translatable/generator_helper.rb, line 12 def model_path File.join(destination_root, 'app/models', class_path, "#{file_name}.rb") end