Sha256: 8c0c1106940bcfc123addab332b9515639e3101398c3e4bb396c94ba116ce42c

Contents?: true

Size: 939 Bytes

Versions: 14

Compression:

Stored size: 939 Bytes

Contents

# frozen_string_literal: true

require 'eac_config/entry_path'

module EacConfig
  class EntryPath
    # @return [Symbol]
    def auto_method_name
      method_name('auto_', '')
    end

    # @return [Symbol]
    def default_method_name
      method_name('', '_default_value')
    end

    # @return [Symbol]
    def get_method_name # rubocop:disable Naming/AccessorMethodName
      method_name('', '')
    end

    # @return [Symbol]
    def get_optional_method_name # rubocop:disable Naming/AccessorMethodName
      method_name('', '_optional')
    end

    # @return [Symbol]
    def inherited_block_method_name
      method_name('', '_inherited_value_proc')
    end

    # @return [String]
    def variableize
      parts.join('_')
    end

    private

    # @param before [String]
    # @param after [String]
    # @return [Symbol]
    def method_name(before, after)
      "#{before}#{variableize}#{after}".to_sym
    end
  end
end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
eac_tools-0.84.2 sub/avm/lib/avm/patches/eac_config/entry_path.rb
avm-0.84.2 lib/avm/patches/eac_config/entry_path.rb
eac_tools-0.84.1 sub/avm/lib/avm/patches/eac_config/entry_path.rb
avm-0.84.1 lib/avm/patches/eac_config/entry_path.rb
eac_tools-0.84.0 sub/avm/lib/avm/patches/eac_config/entry_path.rb
avm-0.84.0 lib/avm/patches/eac_config/entry_path.rb
eac_tools-0.83.0 sub/avm/lib/avm/patches/eac_config/entry_path.rb
avm-0.83.0 lib/avm/patches/eac_config/entry_path.rb
eac_tools-0.82.0 sub/avm/lib/avm/patches/eac_config/entry_path.rb
avm-0.82.0 lib/avm/patches/eac_config/entry_path.rb
eac_tools-0.81.0 sub/avm/lib/avm/patches/eac_config/entry_path.rb
eac_tools-0.80.0 sub/avm/lib/avm/patches/eac_config/entry_path.rb
avm-0.81.0 lib/avm/patches/eac_config/entry_path.rb
eac_tools-0.79.0 sub/avm/lib/avm/patches/eac_config/entry_path.rb