Sha256: dfe8c51d17c4c31774450db1169895ece4b781346a1c4f33b8879fd59c31898c

Contents?: true

Size: 270 Bytes

Versions: 8

Compression:

Stored size: 270 Bytes

Contents

module HumanAttributes
  module Formatters
    class Enumerize < Base
      def apply(_instance, value)
        return unless value
        raise_error('NotEnumerizeAttribute') unless value.class.to_s == "Enumerize::Value"
        value.text
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
human_attributes-0.6.0 lib/human_attributes/formatters/enumerize.rb
human_attributes-0.5.0 lib/human_attributes/formatters/enumerize.rb
human_attributes-0.4.0 lib/human_attributes/formatters/enumerize.rb
human_attributes-0.3.1 lib/human_attributes/formatters/enumerize.rb
human_attributes-0.3.0 lib/human_attributes/formatters/enumerize.rb
human_attributes-0.2.0 lib/human_attributes/formatters/enumerize.rb
human_attributes-0.1.1 lib/human_attributes/formatters/enumerize.rb
human_attributes-0.1.0 lib/human_attributes/formatters/enumerize.rb