struct Stacker::Value

Overview

Value represents an object inside the Stacker runtime.

It wraps a Crystal value in #raw and defines methods to access properties of the wrapped value while being agnostic about the actual type of the wrapped raw value.

Defined in:

stacker/value.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new #

[View source]

Class Method Detail

def self.convert_array(array : Array) #

Convert an Array object into a Stacker::Value object.


[View source]
def self.convert_hash(hash : Hash) #

Convert a Hash object into a Stacker::Value object.


[View source]
def self.deep_merge!(hash, other_hash) #

Recursively merge two Stacker::Value object.

It merges other_hash in hash and returns the modified hash.


[View source]
def self.from_yaml(yaml : String) #

Parse yaml and convert the result object into Stacker::Value object.


[View source]

Instance Method Detail

def [](key : String) #

[View source]
def []=(key : String, value) #

[View source]
def []?(key : String) #

[View source]
def deep_merge!(other) #

[View source]
def delete(*args, **options) #

[View source]
def delete(*args, **options, &) #

[View source]
def each(*args, **options) #

[View source]
def each(*args, **options, &) #

[View source]
def raw : Hash(String, Stacker::Value::Type) #

[View source]
def to_json(*args, **options) #

[View source]
def to_json(*args, **options, &) #

[View source]
def to_yaml(*args, **options) #

[View source]
def to_yaml(*args, **options, &) #

[View source]