Class: CfScript::Command::Spaces::SpaceCommand
- Defined in:
- lib/cf_script/command/cf/spaces/space.rb
Constant Summary
Constants included from UI
UI::COLORS, UI::EMOJI, UI::TAGS
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize ⇒ SpaceCommand
constructor
A new instance of SpaceCommand.
- #run(space_name, &block) ⇒ Object
Methods inherited from Base
#good_run?, #line, #option_value
Methods included from UI::NameTag
#alert, #detail, #error, #info, #name_tag, #progress, #step, #success, #title
Methods included from UI
alert, call_type, debug, detail, emoji, emoji_for, error, info, print_err, print_out, progress, puts_err, puts_out, step, success, tag_char, tag_close, tag_color, tag_format, tag_open, tag_style, title, trace, ui_format, with_color_of
Methods included from Runner
cf_bin, cf_env, cf_id, cf_in_env?, cf_in_path?, cf_path, cf_version, run_cf, which_cf
Constructor Details
#initialize ⇒ SpaceCommand
Returns a new instance of SpaceCommand.
3 4 5 |
# File 'lib/cf_script/command/cf/spaces/space.rb', line 3 def initialize super(:spaces, :space) end |
Instance Method Details
#run(space_name, &block) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/cf_script/command/cf/spaces/space.rb', line 7 def run(space_name, &block) run_cf self, space_name do |output| return unless good_run?(output) if space = build_space(space_name, output) block_given? ? yield(space) : space else error 'object is nil' end end end |