Sha256: df96031b78e05f7789c46ef7128bdc21b484b7fab14e2dcda291f8a9496b0f4c

Contents?: true

Size: 292 Bytes

Versions: 4

Compression:

Stored size: 292 Bytes

Contents

module HSS
  ##
  # Expand a shortcode based the config hash
  class Parser
    private

    def expand(input)
      @config['expansions'].each do |long, shorts|
        return long if shorts.include? input
      end
      fail NameError, "No expansion found for: #{input}"
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
hss-1.0.1 lib/hss/helpers/expand.rb
hss-1.0.0 lib/hss/helpers/expand.rb
hss-0.2.11 lib/hss/helpers/expand.rb
hss-0.2.10 lib/helpers/expand.rb