Sha256: 5d32f689cfbc886cbc22ab1771d066d62ecfd3bd70d96fc3f8bd0be575068009

Contents?: true

Size: 264 Bytes

Versions: 7

Compression:

Stored size: 264 Bytes

Contents

module ChatWork
  module Converter
    def hash_compact(hash)
      hash.reject {|_k, v| v.nil? }
    end

    def boolean_to_integer(value)
      case value
      when true
        1
      when false
        0
      else
        value
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
chatwork-0.12.3 lib/chatwork/converter.rb
chatwork-0.12.2 lib/chatwork/converter.rb
chatwork-0.12.1 lib/chatwork/converter.rb
chatwork-0.12.0 lib/chatwork/converter.rb
chatwork-0.11.0 lib/chatwork/converter.rb
chatwork-0.10.0 lib/chatwork/converter.rb
chatwork-0.9.0 lib/chatwork/converter.rb