Sha256: a86c8a42cfd30d6d6b6bd5ee1d76afd09532422b7c2dc0e8ec871ae2deda71cd

Contents?: true

Size: 194 Bytes

Versions: 20

Compression:

Stored size: 194 Bytes

Contents

module ModelHelpers
  def deep_unwrap(value)
    if value.is_a?(Model)
      value = value.to_h
    elsif value.is_a?(ArrayModel)
      value = value.to_a
    end
    
    return value
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
volt-0.5.18 lib/volt/models/model_helpers.rb
volt-0.5.17 lib/volt/models/model_helpers.rb
volt-0.5.16 lib/volt/models/model_helpers.rb
volt-0.5.15 lib/volt/models/model_helpers.rb
volt-0.5.14 lib/volt/models/model_helpers.rb
volt-0.5.13 lib/volt/models/model_helpers.rb
volt-0.5.12 lib/volt/models/model_helpers.rb
volt-0.5.11 lib/volt/models/model_helpers.rb
volt-0.5.10 lib/volt/models/model_helpers.rb
volt-0.5.9 lib/volt/models/model_helpers.rb
volt-0.5.8 lib/volt/models/model_helpers.rb
volt-0.5.7 lib/volt/models/model_helpers.rb
volt-0.5.6 lib/volt/models/model_helpers.rb
volt-0.5.4 lib/volt/models/model_helpers.rb
volt-0.5.3 lib/volt/models/model_helpers.rb
volt-0.5.2 lib/volt/models/model_helpers.rb
volt-0.5.1 lib/volt/models/model_helpers.rb
volt-0.5.0 lib/volt/models/model_helpers.rb
volt-0.4.18 lib/volt/models/model_helpers.rb
volt-0.4.17 lib/volt/models/model_helpers.rb