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



51
52
53
54
55
# File 'lib/generators/pulitzer/post_type_generator.rb', line 51

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