Class: Pageflow::EntryDuplicate

Inherits:
Struct
  • Object
show all
Defined in:
app/models/pageflow/entry_duplicate.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#original_entryObject

Returns the value of attribute original_entry

Returns:

  • (Object)

    the current value of original_entry



2
3
4
# File 'app/models/pageflow/entry_duplicate.rb', line 2

def original_entry
  @original_entry
end

Class Method Details

.of(entry) ⇒ Object



12
13
14
# File 'app/models/pageflow/entry_duplicate.rb', line 12

def self.of(entry)
  new(entry)
end

Instance Method Details

#create!Object



3
4
5
6
7
8
9
10
# File 'app/models/pageflow/entry_duplicate.rb', line 3

def create!
  create_entry

  copy_draft
  copy_memberships

  new_entry
end