Class: Staticz::Compilable::Js

Inherits:
Object
  • Object
show all
Includes:
Staticz::Compilable
Defined in:
lib/manifest/compilable/js.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Staticz::Compilable

#build_path, #create_link_function, #errors, #exists?, #path, #path_method_name, #print, #source_path, #valid?

Constructor Details

#initialize(name) ⇒ Js

Returns a new instance of Js.



16
17
18
# File 'lib/manifest/compilable/js.rb', line 16

def initialize(name)
  @name = name
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



8
9
10
# File 'lib/manifest/compilable/js.rb', line 8

def name
  @name
end

Instance Method Details

#buildObject



20
21
22
23
24
# File 'lib/manifest/compilable/js.rb', line 20

def build
  if exists?
    File.write build_path, File.read(source_path)
  end
end

#build_file_endingObject



12
# File 'lib/manifest/compilable/js.rb', line 12

def build_file_ending = "js"

#source_file_endingObject



10
# File 'lib/manifest/compilable/js.rb', line 10

def source_file_ending = "js"

#tile_type_nameObject



14
# File 'lib/manifest/compilable/js.rb', line 14

def tile_type_name = "Js"