Sha256: 04bcc491995c8c63cf802c669503ef4dab3011ee0f1bd169919098874f7bfe59

Contents?: true

Size: 668 Bytes

Versions: 5

Compression:

Stored size: 668 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_kit_id
        library_name.delete_suffix('_test_kit')
      end

      def test_suite_id
        test_kit_id
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
inferno_core-0.6.2 lib/inferno/utils/named_thor_actions.rb
inferno_core-0.6.1 lib/inferno/utils/named_thor_actions.rb
inferno_core-0.6.0 lib/inferno/utils/named_thor_actions.rb
inferno_core-0.5.4 lib/inferno/utils/named_thor_actions.rb
inferno_core-0.5.3 lib/inferno/utils/named_thor_actions.rb