Sha256: ac72e412dc8830a29403930d5bb746bda1f6ad386e729000df959cd5fa428e89
Contents?: true
Size: 604 Bytes
Versions: 11
Compression:
Stored size: 604 Bytes
Contents
# frozen_string_literal: true module Remocon class Normalizer attr_reader :content def initialize(content, opts) @content = content.nil? ? opts[:default] : content @opts = opts end def process tap do raise Remocon::ValidationError, "#{self.class} is not satisfying normalizer" unless self.class.respond_symbol validate @content = normalize end end def validate # no-op end def normalize @content end def self.respond_symbol raise Remocon::UnsupportedTypeError, "unknown" end end end
Version data entries
11 entries across 11 versions & 1 rubygems