Class: EmberCLI::Deploy::Redis
- Inherits:
-
Object
- Object
- EmberCLI::Deploy::Redis
- Defined in:
- lib/ember-cli/deploy/redis.rb
Instance Method Summary collapse
- #append_to_body(markup) ⇒ Object
- #append_to_head(markup) ⇒ Object
- #html ⇒ Object
-
#initialize(namespace:, index_html: nil, redis_client: build_client) ⇒ Redis
constructor
A new instance of Redis.
Constructor Details
#initialize(namespace:, index_html: nil, redis_client: build_client) ⇒ Redis
Returns a new instance of Redis.
8 9 10 11 12 13 14 |
# File 'lib/ember-cli/deploy/redis.rb', line 8 def initialize(namespace:, index_html: nil, redis_client: build_client) @redis_client = redis_client @namespace = namespace @index_html = index_html @body_markup = [] @head_markup = [] end |
Instance Method Details
#append_to_body(markup) ⇒ Object
16 17 18 |
# File 'lib/ember-cli/deploy/redis.rb', line 16 def append_to_body(markup) body_markup << markup end |
#append_to_head(markup) ⇒ Object
20 21 22 |
# File 'lib/ember-cli/deploy/redis.rb', line 20 def append_to_head(markup) head_markup << markup end |
#html ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/ember-cli/deploy/redis.rb', line 24 def html if index_html.present? page = Page.new(html: index_html) body_markup.each do |markup| page.append_to_body(markup) end head_markup.each do |markup| page.append_to_head(markup) end page.build else index_html_missing! end end |