class SiphonGenerator
Public Instance Methods
class_mate()
click to toggle source
# File lib/generators/siphon_generator.rb, line 17 def class_mate classy = begin Object.const_get(class_name) || Object.const_get( file_name.classify) rescue end end
create_controller()
click to toggle source
# File lib/generators/siphon_generator.rb, line 8 def create_controller template "controller.rb", File.join('app/controllers', class_path, "#{file_name.pluralize}_controller.rb") end
create_search_file()
click to toggle source
# File lib/generators/siphon_generator.rb, line 4 def create_search_file template "search.rb", File.join('app/siphon', class_path, "#{file_name}_search.rb") end
create_view()
click to toggle source
# File lib/generators/siphon_generator.rb, line 12 def create_view template "view.rb", File.join('app/views', class_path, "#{file_name.pluralize}", "_search.html.haml") end