Method: Falcon::ApiRuleV1#_to_hash
- Defined in:
- lib/crimson-falcon/models/api_rule_v1.rb
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
537 538 539 540 541 542 543 544 545 546 547 548 549 |
# File 'lib/crimson-falcon/models/api_rule_v1.rb', line 537 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |