Class: Wlog::NewEntry
- Inherits:
-
Commandable
- Object
- Commandable
- Wlog::NewEntry
- Defined in:
- lib/wlog/commands/new_entry.rb
Overview
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(desc, issue) ⇒ NewEntry
constructor
A new instance of NewEntry.
Constructor Details
#initialize(desc, issue) ⇒ NewEntry
Returns a new instance of NewEntry.
11 12 13 |
# File 'lib/wlog/commands/new_entry.rb', line 11 def initialize(desc, issue) @desc, @issue = desc, issue end |
Instance Method Details
#execute ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/wlog/commands/new_entry.rb', line 15 def execute log_entry = LogEntry.new( :description => @desc, :created_at => DateTime.now, :updated_at => DateTime.now) @issue.log_entries << log_entry end |