module Memo::CLI::Input

Extended Modules

Defined in:

cli/input.cr

Instance Method Summary

Instance Method Detail

def bool(data : Hash(String, JSON::Any), key : String, default : Bool = false) : Bool #

[View source]
def external_id(data : Hash(String, JSON::Any), key : String) : Memo::ExternalId | Nil #

Parse external ID (Int64 or String)

Accepts either an integer or string value and returns the appropriate type. Used for source_id, pair_id, parent_id which support both types.


[View source]
def external_id!(data : Hash(String, JSON::Any), key : String) : Memo::ExternalId #

Parse required external ID (Int64 or String)


[View source]
def float(data : Hash(String, JSON::Any), key : String) : Float64 | Nil #

[View source]
def int(data : Hash(String, JSON::Any), key : String) : Int32 | Nil #

[View source]
def int64(data : Hash(String, JSON::Any), key : String) : Int64 | Nil #

[View source]
def string(data : Hash(String, JSON::Any), key : String) : String | Nil #

[View source]