Class: Rubytypeformio::Base
- Inherits:
-
Object
- Object
- Rubytypeformio::Base
- Defined in:
- lib/rubytypeformio/base.rb
Instance Method Summary collapse
Instance Method Details
#compact(hash) ⇒ Object
12 13 14 15 |
# File 'lib/rubytypeformio/base.rb', line 12 def compact(hash) # hash.delete_if { |k, v| v.nil? } hash.delete_if { |key, value| value.to_s.strip == '' } end |
#pretty ⇒ Object
7 8 9 10 |
# File 'lib/rubytypeformio/base.rb', line 7 def pretty # pry puts JSON.pretty_generate(self.to_h) end |