Class: Redcar::Textmate::CreateNewSnippet
Constant Summary
Constants included from Observable
Instance Attribute Summary
Attributes inherited from Command
Instance Method Summary (collapse)
- - (Object) execute
-
- (CreateNewSnippet) initialize(bundle, menu = nil)
constructor
A new instance of CreateNewSnippet.
Methods inherited from Command
active_changed, #environment, inherited, #inspect, norecord, record?, #run
Methods included from Sensitive
#active?, #sensitivities, #sensitivity_names, #sensitize
Methods included from Observable
#add_listener, #notify_listeners, #remove_listener
Constructor Details
- (CreateNewSnippet) initialize(bundle, menu = nil)
A new instance of CreateNewSnippet
29 30 31 |
# File 'plugins/textmate/lib/textmate/commands.rb', line 29 def initialize bundle,=nil @bundle,@menu = bundle, end |
Instance Method Details
- (Object) execute
33 34 35 36 37 38 |
# File 'plugins/textmate/lib/textmate/commands.rb', line 33 def execute result = Redcar::Application::Dialog.input("Create Snippet","Choose a name for your new snippet:") if result[:button] == :ok and not result[:value].empty? BundleEditor.create_snippet result[:value], @bundle, @menu end end |