class TandaCLI::Configuration::Serialisable

Included Modules

Defined in:

tanda_cli/configuration/serialisable.cr
tanda_cli/configuration/serialisable/access_token.cr
tanda_cli/configuration/serialisable/environment.cr
tanda_cli/configuration/serialisable/organisation.cr

Constant Summary

PRODUCTION = Configuration::PRODUCTION

Constructors

Instance Method Summary

Macros inherited from module TandaCLI::Configuration::Macros

environment_property(name) environment_property

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]
def self.new(clockin_photo_path : String | Nil = nil, production : Environment = Environment.new, staging : Environment = Environment.new, mode : String = PRODUCTION, start_of_week : Time::DayOfWeek = Time::DayOfWeek::Monday, treat_paid_breaks_as_unpaid : Bool | Nil = false) #

[View source]

Instance Method Detail

def access_token : AccessToken #

[View source]
def access_token=(value : AccessToken) #

[View source]
def clockin_photo_path : String | Nil #

[View source]
def clockin_photo_path=(clockin_photo_path : String | Nil) #

[View source]
def current_environment : Environment #

[View source]
def mode : String #

[View source]
def mode=(mode : String) #

[View source]
def organisations : Array(Organisation) #

properties that are delegated based on the current environment


[View source]
def organisations=(value : Array(Organisation)) #

properties that are delegated based on the current environment


[View source]
def pretty_start_of_week : String #

[View source]
def production : Environment #

[View source]
def production=(production : Environment) #

[View source]
def reset_environment! #

[View source]
def site_prefix : String #

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

[View source]
def staging : Environment #

[View source]
def staging=(staging : Environment) #

[View source]
def staging? : Bool #

[View source]
def start_of_week : Time::DayOfWeek #

[View source]
def start_of_week=(value : String) : Time::DayOfWeek | Error::InvalidStartOfWeek #

[View source]
def treat_paid_breaks_as_unpaid=(treat_paid_breaks_as_unpaid : Bool | Nil) #

[View source]
def treat_paid_breaks_as_unpaid? : Bool | Nil #

[View source]