Method: Azuki::Command::Labs#disable
- Defined in:
- lib/azuki/command/labs.rb
#disable ⇒ Object
labs:disable FEATURE
disables an experimental feature
Example:
$ azuki labs:disable ninja-power Disabling ninja-power feature for [email protected]… done
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/azuki/command/labs.rb', line 74 def disable feature_name = shift_argument error "Usage: azuki labs:disable FEATURE\nMust specify FEATURE to disable." unless feature_name validate_arguments! feature = api.get_features(app).body.detect { |f| f["name"] == feature_name } = "Disabling #{feature_name} " error "No such feature: #{feature_name}" unless feature if feature["kind"] == "user" += "for #{Azuki::Auth.user}" else error "Must specify an app" unless app += "for #{app}" end action do api.delete_feature feature_name, app end end |