Class: PrelandsRails::CreateSimpleSource::Compile::HtmlCompiler

Inherits:
Object
  • Object
show all
Defined in:
lib/prelands_rails/create_simple_source/compile/html_compiler.rb

Overview

Компилирует html преленда.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(string, index_css, index_js, lang, static_js_path) ⇒ HtmlCompiler



18
19
20
21
22
23
24
25
# File 'lib/prelands_rails/create_simple_source/compile/html_compiler.rb', line 18

def initialize(string, index_css, index_js, lang, static_js_path)
  @string         = string.gsub(/(\r\n?|\n)/, '') # убираем переносы, мешающие регуляркам
  @index_css      = index_css
  @index_js       = index_js
  @lang           = lang
  @static_js_path = static_js_path
  prepare
end

Instance Attribute Details

#compiledObject (readonly)

Returns the value of attribute compiled.



11
12
13
# File 'lib/prelands_rails/create_simple_source/compile/html_compiler.rb', line 11

def compiled
  @compiled
end