Sha256: 806cb83e7d4efe139ee2fcfc23e01a8fcc8e6dbee8e4f9cfe2c9ca00cad6ef00

Contents?: true

Size: 413 Bytes

Versions: 13

Compression:

Stored size: 413 Bytes

Contents

# frozen_string_literal: true
require 'happymapper'
require 'active_support/core_ext/string'

module ForwardCalendar
  module Helper
    class NormalizedString
      def self.parse(value)
        value.to_s.underscore.downcase
      end
    end
  end
end

HappyMapper::SupportedTypes.register_type(ForwardCalendar::Helper::NormalizedString) do |value|
  ForwardCalendar::Helper::NormalizedString.parse(value)
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
forward-calendar-0.8.1 lib/forward_calendar/helper/normalized_string.rb
forward-calendar-0.8.0 lib/forward_calendar/helper/normalized_string.rb
forward-calendar-0.7.1 lib/forward_calendar/helper/normalized_string.rb
forward-calendar-0.7.0 lib/forward_calendar/helper/normalized_string.rb
forward-calendar-0.6.1 lib/forward_calendar/helper/normalized_string.rb
forward-calendar-0.6.0 lib/forward_calendar/helper/normalized_string.rb
forward-calendar-0.5.0 lib/forward_calendar/helper/normalized_string.rb
forward-calendar-0.4.0 lib/forward_calendar/helper/normalized_string.rb
forward-calendar-0.3.0 lib/forward_calendar/helper/normalized_string.rb
forward-calendar-0.2.0 lib/forward_calendar/helper/normalized_string.rb
forward-calendar-0.1.2 lib/forward_calendar/helper/normalized_string.rb
forward-calendar-0.1.1 lib/forward_calendar/helper/normalized_string.rb
forward-calendar-0.1.0 lib/forward_calendar/helper/normalized_string.rb