Class: Contentful::Bootstrap::Templates::Base
- Inherits:
-
Object
- Object
- Contentful::Bootstrap::Templates::Base
show all
- Defined in:
- lib/contentful/bootstrap/templates/base.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(space) ⇒ Base
Returns a new instance of Base.
11
12
13
|
# File 'lib/contentful/bootstrap/templates/base.rb', line 11
def initialize(space)
@space = space
end
|
Instance Attribute Details
#space ⇒ Object
Returns the value of attribute space.
9
10
11
|
# File 'lib/contentful/bootstrap/templates/base.rb', line 9
def space
@space
end
|
Instance Method Details
#assets ⇒ Object
38
39
40
|
# File 'lib/contentful/bootstrap/templates/base.rb', line 38
def assets
[]
end
|
#content_types ⇒ Object
30
31
32
|
# File 'lib/contentful/bootstrap/templates/base.rb', line 30
def content_types
[]
end
|
#entries ⇒ Object
34
35
36
|
# File 'lib/contentful/bootstrap/templates/base.rb', line 34
def entries
{}
end
|
#run ⇒ Object
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# File 'lib/contentful/bootstrap/templates/base.rb', line 15
def run
begin
create_content_types
create_assets
create_entries
rescue Contentful::Management::Error => e
error = e.error
puts "Error at: #{error[:url]}"
puts "Message: #{error[:message]}"
puts "Details: #{error[:details]}"
raise e
end
end
|