class Duty::Git::Tasks::StartFeature
Public Class Methods
description()
click to toggle source
# File lib/duty/git.rb, line 31 def self.description "Start a new feature" end
usage()
click to toggle source
# File lib/duty/git.rb, line 35 def self.usage "duty start-feature <feature-name>" end
Public Instance Methods
execute()
click to toggle source
# File lib/duty/git.rb, line 43 def execute checkout_master sh("Create `feature/#{@feature_name}` branch") { "git checkout -b feature/#{@feature_name}" } sh("Push `feature/#{@feature_name}` branch to `origin`") { "git push -u origin feature/#{@feature_name}" } end
valid?()
click to toggle source
# File lib/duty/git.rb, line 39 def valid? @feature_name = @arguments.first end