module Eco module API class Session class Config class Apis module SpaceHelpers def space_option? SCR.get_arg('-space') end def space_option :default.then do |default| value = SCR.get_arg('-space', with_param: true) value = nil if value.to_s.strip.empty? value = to_space(value) unless value.nil? next default unless value value end end def set_options_space!(space) ASSETS.cli.options.deep_merge!(api: {space: space}) end private def to_space(...) Session::Config::Api.to_space(...) end def full_name(...) Session::Config::Api.full_name(...) end end end end end end end