Sha256: 717aebe4e7a322930b879401c8685eeba8e494593f2a0c379704df7353ed51fb

Contents?: true

Size: 399 Bytes

Versions: 1

Compression:

Stored size: 399 Bytes

Contents

# frozen_string_literal: true

# Author::    Lucas Carlson  (mailto:lucas@rufy.com)
# Copyright:: Copyright (c) 2005 Lucas Carlson
# License::   LGPL

require 'classifier-reborn/extensions/hasher'

module ClassifierReborn
  module CategoryNamer
    module_function

    def prepare_name(name)
      return name if name.is_a?(Symbol)

      name.to_s.tr('_', ' ').capitalize.intern
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
classifier-reborn-2.3.0 lib/classifier-reborn/category_namer.rb