lib/standup_md/entry.rb in standup_md-0.3.7 vs lib/standup_md/entry.rb in standup_md-0.3.8
- old
+ new
@@ -53,18 +53,16 @@
# Creates a generic entry. Default values can be set via configuration.
# Yields the entry if a block is passed so you can change values.
#
# @return [StandupMD::Entry]
def self.create
- entry = new(
+ new(
Date.today,
config.current,
config.previous,
config.impediments,
config.notes
- )
- yield config if block_given?
- entry
+ ).tap { |entry| yield entry if block_given? }
end
##
# Constructs instance of +StandupMD::Entry+.
#