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: 12 days ago
JSON representation
A Liquid drop that wraps a hash, or an array
- Host: GitHub
- URL: https://github.com/envygeeks/liquid-hash-or-array-drop
- Owner: envygeeks
- License: mit
- Created: 2017-08-11T07:03:42.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-08-14T03:39:24.000Z (almost 9 years ago)
- Last Synced: 2025-10-23T20:47:56.289Z (9 months ago)
- Topics: array, drop, hash, liquid, liquid-drop, ruby
- Language: Ruby
- Size: 10.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# 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
```