Sha256: 744dd394b50e3d5a1ce160d8dc913610d883067f31675570a3e84155d17f608a

Contents?: true

Size: 933 Bytes

Versions: 29

Compression:

Stored size: 933 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}"
    end
  end
end

Version data entries

29 entries across 29 versions & 2 rubygems

Version Path
avm-0.94.1 lib/avm/patches/eac_config/entry_path.rb
eac_tools-0.98.0 sub/avm/lib/avm/patches/eac_config/entry_path.rb
avm-0.94.0 lib/avm/patches/eac_config/entry_path.rb
eac_tools-0.94.0 sub/avm/lib/avm/patches/eac_config/entry_path.rb
avm-0.93.0 lib/avm/patches/eac_config/entry_path.rb
eac_tools-0.92.0 sub/avm/lib/avm/patches/eac_config/entry_path.rb
avm-0.92.0 lib/avm/patches/eac_config/entry_path.rb
eac_tools-0.91.0 sub/avm/lib/avm/patches/eac_config/entry_path.rb
avm-0.90.1 lib/avm/patches/eac_config/entry_path.rb
eac_tools-0.87.1 sub/avm/lib/avm/patches/eac_config/entry_path.rb
avm-0.90.0 lib/avm/patches/eac_config/entry_path.rb
eac_tools-0.87.0 sub/avm/lib/avm/patches/eac_config/entry_path.rb
avm-0.89.0 lib/avm/patches/eac_config/entry_path.rb
eac_tools-0.86.12 sub/avm/lib/avm/patches/eac_config/entry_path.rb
avm-0.88.0 lib/avm/patches/eac_config/entry_path.rb
eac_tools-0.86.11 sub/avm/lib/avm/patches/eac_config/entry_path.rb
avm-0.87.0 lib/avm/patches/eac_config/entry_path.rb
eac_tools-0.86.8 sub/avm/lib/avm/patches/eac_config/entry_path.rb
avm-0.86.2 lib/avm/patches/eac_config/entry_path.rb
eac_tools-0.86.7 sub/avm/lib/avm/patches/eac_config/entry_path.rb