Sha256: 8f5fc50a21c825dbab291935a82a6ba9588dd3831470f5c1c754eac976907e8c

Contents?: true

Size: 604 Bytes

Versions: 18

Compression:

Stored size: 604 Bytes

Contents

require 'dry/inflector'

module Inferno
  module Utils
    module NamedThorActions
      INFLECTOR = Dry::Inflector.new

      def root_name
        INFLECTOR.dasherize(INFLECTOR.underscore(name))
      end

      def library_name
        INFLECTOR.underscore(name)
      end

      def module_name
        INFLECTOR.camelize(name)
      end

      def human_name
        INFLECTOR.humanize(INFLECTOR.underscore(name))
      end

      def title_name
        human_name.split.map(&:capitalize).join(' ')
      end

      def test_suite_id
        "#{library_name}_test_suite"
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
inferno_core-0.5.2 lib/inferno/utils/named_thor_actions.rb
inferno_core-0.5.1 lib/inferno/utils/named_thor_actions.rb
inferno_core-0.5.0 lib/inferno/utils/named_thor_actions.rb
inferno_core-0.4.44 lib/inferno/utils/named_thor_actions.rb
inferno_core-0.4.43 lib/inferno/utils/named_thor_actions.rb
inferno_core-0.4.42 lib/inferno/utils/named_thor_actions.rb
inferno_core-0.4.41 lib/inferno/utils/named_thor_actions.rb
inferno_core-0.4.40 lib/inferno/utils/named_thor_actions.rb
inferno_core-0.4.39 lib/inferno/utils/named_thor_actions.rb
inferno_core-0.4.38 lib/inferno/utils/named_thor_actions.rb
inferno_core-0.4.35 lib/inferno/utils/named_thor_actions.rb
inferno_core-0.4.34 lib/inferno/utils/named_thor_actions.rb
inferno_core-0.4.33 lib/inferno/utils/named_thor_actions.rb
inferno_core-0.4.32 lib/inferno/utils/named_thor_actions.rb
inferno_core-0.4.31 lib/inferno/utils/named_thor_actions.rb
inferno_core-0.4.30 lib/inferno/utils/named_thor_actions.rb
inferno_core-0.4.29 lib/inferno/utils/named_thor_actions.rb
inferno_core-0.4.28 lib/inferno/utils/named_thor_actions.rb