Class: Pulitzer::PostTypeGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Includes:
ActiveSupport::Inflector
Defined in:
lib/generators/pulitzer/post_type_generator.rb

Instance Method Summary collapse

Instance Method Details

#build_post_type_filesObject



45
46
47
48
49
# File 'lib/generators/pulitzer/post_type_generator.rb', line 45

def build_post_type_files
  abort("Couldn't find Pulitzer::PostType named #{post_type_name}") unless post_type.is_a? Pulitzer::PostType
  kind_method = "build_#{kind}"
  send kind_method
end