Class: Caramelize::ContentTransferer
- Inherits:
-
Object
- Object
- Caramelize::ContentTransferer
- Defined in:
- lib/caramelize/content_transferer.rb
Constant Summary collapse
- DEFAULT_GOLLUM_HOME_TITLE =
'Home'.freeze
Instance Attribute Summary collapse
-
#input_wiki ⇒ Object
readonly
Returns the value of attribute input_wiki.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(input_wiki, options) ⇒ ContentTransferer
constructor
A new instance of ContentTransferer.
Constructor Details
#initialize(input_wiki, options) ⇒ ContentTransferer
Returns a new instance of ContentTransferer.
17 18 19 20 21 22 23 |
# File 'lib/caramelize/content_transferer.rb', line 17 def initialize(input_wiki, ) @input_wiki = input_wiki @options = [:default_author] = .fetch(:default_author, "Caramelize") [:markup] = target_markup end |
Instance Attribute Details
#input_wiki ⇒ Object (readonly)
Returns the value of attribute input_wiki.
13 14 15 |
# File 'lib/caramelize/content_transferer.rb', line 13 def input_wiki @input_wiki end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
13 14 15 |
# File 'lib/caramelize/content_transferer.rb', line 13 def @options end |
Instance Method Details
#execute ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/caramelize/content_transferer.rb', line 25 def execute input_wiki. commit_history if verbose? puts "From markup: #{input_wiki.markup.to_s}" puts "To markup: #{target_markup.to_s}" puts "Convert latest revisions:" end migrate_markup_of_latest_revisions puts 'Create Namespace Overview' if verbose? create_overview_page_of_namespaces if [:create_namespace_overview] rename_home_page end |