Sha256: 1d6d15b6442060891fa0ea394521eccceffa7f76c0c7f3bda28c255afdfc6216
Contents?: true
Size: 633 Bytes
Versions: 5
Compression:
Stored size: 633 Bytes
Contents
module Merb module Generators class NamedGenerator < Generator # NOTE: Currently this is not inherited, it will have to be declared in each generator # that inherits from this. first_argument :name, :required => true def class_name name.gsub('-', '_').camel_case end alias_method :module_name, :class_name def test_class_name class_name + "Test" end def file_name name.snake_case end alias_method :base_name, :file_name def symbol_name file_name.gsub('-', '_') end end end end
Version data entries
5 entries across 5 versions & 1 rubygems