Class: Contentful::Bootstrap::Commands::UpdateSpace
- Defined in:
- lib/contentful/bootstrap/commands/update_space.rb
Instance Attribute Summary collapse
-
#json_template ⇒ Object
readonly
Returns the value of attribute json_template.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(token, space_id, json_template = nil, mark_processed = false, trigger_oauth = true, skip_content_types = false) ⇒ UpdateSpace
constructor
A new instance of UpdateSpace.
- #run ⇒ Object
Methods included from Support
Constructor Details
#initialize(token, space_id, json_template = nil, mark_processed = false, trigger_oauth = true, skip_content_types = false) ⇒ UpdateSpace
Returns a new instance of UpdateSpace.
11 12 13 14 15 16 |
# File 'lib/contentful/bootstrap/commands/update_space.rb', line 11 def initialize(token, space_id, json_template = nil, mark_processed = false, trigger_oauth = true, skip_content_types = false) super(token, space_id, trigger_oauth) @json_template = json_template @mark_processed = mark_processed @skip_content_types = skip_content_types end |
Instance Attribute Details
#json_template ⇒ Object (readonly)
Returns the value of attribute json_template.
10 11 12 |
# File 'lib/contentful/bootstrap/commands/update_space.rb', line 10 def json_template @json_template end |
Instance Method Details
#run ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/contentful/bootstrap/commands/update_space.rb', line 18 def run if @json_template.nil? puts 'JSON Template not found. Exiting!' exit(1) end puts "Updating Space '#{@space}'" update_space = fetch_space update_json_template(update_space) puts puts "Successfully updated Space #{@space}" update_space end |