module JSON::OnSteroids::Access
Overview
Access and mutate values
Direct including types
Defined in:
json_on_steroids/access.crInstance Method Summary
-
#<<(value)
Assume the current mutable is an array and append a value at the end.
-
#[](key : Int)
Assume the current mutable is an array and return the value at the key offset.
-
#[](key : String)
Assume the current mutable is an hash and return the value under the key
-
#[]=(key : String, value)
Assume the current mutable is an hash and set a value to a given key.
-
#[]=(key : Int, value)
Assume the current mutable is an array and set a value to a given key.
-
#[]?(key : String)
Assume the current mutable is an hash and return the value under the key, if any.
-
#create_arr(key : String | Int)
Create empty array for a specific key
-
#create_obj(key : String | Int)
Create empty obj at a specific key
- #fetch(key : String, &)
Instance Method Detail
def []=(key : String, value)
#
Assume the current mutable is an hash and set a value to a given key.
def []?(key : String)
#
Assume the current mutable is an hash and return the value under the key, if any.