Module: ChatWork::Converter
- Included in:
- BaseClient
- Defined in:
- lib/chatwork/converter.rb
Instance Method Summary collapse
Instance Method Details
#boolean_to_integer(value) ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/chatwork/converter.rb', line 7 def boolean_to_integer(value) case value when true 1 when false 0 else value end end |
#hash_compact(hash) ⇒ Object
3 4 5 |
# File 'lib/chatwork/converter.rb', line 3 def hash_compact(hash) hash.reject {|_k, v| v.nil? } end |