lib/eco/api/session/config.rb in eco-helpers-1.0.4 vs lib/eco/api/session/config.rb in eco-helpers-1.0.5
- old
+ new
@@ -115,12 +115,20 @@
# FILES
def working_directory=(path)
files.working_directory = path
end
- def working_directory(mode: :active_api)
+ def working_directory(mode: nil)
+ unless mode
+ wd = files.working_directory
+ return wd unless wd.to_s.strip.empty?
+ end
+
+ mode ||= :active_api
if mode == :active_api
apis.active_root_name
+ elsif mode == :raw_api_name
+ apis.active_name
else
files.working_directory
end
end