An open API service indexing awesome lists of open source software.

https://github.com/envygeeks/liquid-hash-or-array-drop

A Liquid drop that wraps a hash, or an array
https://github.com/envygeeks/liquid-hash-or-array-drop

array drop hash liquid liquid-drop ruby

Last synced: 8 months ago
JSON representation

A Liquid drop that wraps a hash, or an array

Awesome Lists containing this project

README

          



Donate





# Liquid Hash Or Array Drop

Provides a drop wrapper for Hashes and Array's that allows Liquid to utilize the data as well as allows you to utilize the data. It can encapsulate both hashes and arrays in the same instance.

## Usage

```ruby
require "liquid/drop/hash_or_array"
a = Liquid::Drop::HashOrArray.new({
:hello => :worl
})

a.first # => [:hello, :world]
a.liquid_method_missing(:hello) # => :world
a[:hello] # => :world
```