Module: Eco::API::Session::Config::Apis::SpaceHelpers

Included in:
EnviroSpaces
Defined in:
lib/eco/api/session/config/apis/space_helpers.rb

Instance Method Summary collapse

Instance Method Details

#set_options_space!(space) ⇒ Object



23
24
25
# File 'lib/eco/api/session/config/apis/space_helpers.rb', line 23

def set_options_space!(space)
  ASSETS.cli.options.deep_merge!(api: {space: space})
end

#space_optionObject



11
12
13
14
15
16
17
18
19
20
21
# File 'lib/eco/api/session/config/apis/space_helpers.rb', line 11

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

#space_option?Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/eco/api/session/config/apis/space_helpers.rb', line 7

def space_option?
  SCR.get_arg('-space')
end