gimmyxd/mentors4me-api

View on GitHub
app/services/substitution_parsing_service.rb

Summary

Maintainability
A
0 mins
Test Coverage
# frozen_string_literal: true

class SubstitutionParsingService
  def initialize(options)
    @options = options
  end

  def call
    parse_hash
  end

  private

  def parse_hash
    result = []
    @options.each do |key, value|
      hash_pair = {
        key: "-#{key}-",
        value: value
      }
      result << hash_pair
    end
    result
  end
end