class TypedOperationGenerator
def generate_operation
def generate_operation template( File.join(self.class.source_root, "operation.rb"), File.join(options[:path], "#{file_name}.rb") ) template( File.join(self.class.source_root, "operation_test.rb"), File.join("test/", options[:path].gsub(/\Aapp\//, ""), "#{file_name}_test.rb") ) end
def namespace_name
def namespace_name namespace_path = options[:path].gsub(/^app\/[^\/]*\//, "") namespace_path.split("/").map(&:camelize).join("::") end