Sha256: 418262f71f096a06b4b92992662eaf91819d3bb7688f360af1f820d2fba36d32
Contents?: true
Size: 805 Bytes
Versions: 1
Compression:
Stored size: 805 Bytes
Contents
# frozen_string_literal: true module Evertils module Action class DuplicatePrevious < Action::Base def initialize(args) super(args) @args.content = previous_note_content query = Evertils::Common::Query::Simple.new query.create_note_from_hash(@args.to_h) end private def previous_note_content helper = Evertils::Helper::Note.instance note = helper.wait_for_with_grammar(grammar) @api.convert_to_xml(note.entity.content).prepare end def grammar terms = Grammar.new terms.notebook = @args[:notebook] terms.tags = { day: (Date.today.yday - 1) } terms.created = Date.new(Date.today.year, 1, 1).strftime('%Y%m%d') terms end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
evertils-2.3.2 | lib/evertils/actions/duplicate_previous.rb |