Created
April 2, 2013 18:35
-
-
Save cored/5294905 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module TM | |
| module Commands | |
| class LastTask | |
| def initialize(provider_handler, formatter, attributes = '') | |
| @provider_handler = provider_handler | |
| @formatter = formatter | |
| @attributes = attributes.extend(TM::StringExtensions).to_hash | |
| end | |
| def execute | |
| project = @provider_handler.project(@attributes) | |
| ticket = project.tickets.last | |
| @formatter.before(ticket) | |
| @formatter.format(ticket) | |
| @formatter.after | |
| end | |
| end | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment