Class: Staticz::Compilable::SimpleFile
- Inherits:
-
Object
- Object
- Staticz::Compilable::SimpleFile
show all
- Includes:
- Staticz::Compilable
- Defined in:
- lib/manifest/compilable/simple_file.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
#errors, #exists?, #path, #print, #valid?
Constructor Details
Returns a new instance of SimpleFile.
27
28
29
|
# File 'lib/manifest/compilable/simple_file.rb', line 27
def initialize(name)
@name = name
end
|
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
8
9
10
|
# File 'lib/manifest/compilable/simple_file.rb', line 8
def name
@name
end
|
Instance Method Details
#build ⇒ Object
31
32
33
34
35
|
# File 'lib/manifest/compilable/simple_file.rb', line 31
def build
if exists?
File.write build_path, File.read(source_path)
end
end
|
#build_path ⇒ Object
14
15
16
|
# File 'lib/manifest/compilable/simple_file.rb', line 14
def build_path
"build/#{name}"
end
|
#create_link_function ⇒ Object
18
19
|
# File 'lib/manifest/compilable/simple_file.rb', line 18
def create_link_function
end
|
#path_method_name ⇒ Object
21
22
23
|
# File 'lib/manifest/compilable/simple_file.rb', line 21
def path_method_name
"no path created"
end
|
#source_path ⇒ Object
10
11
12
|
# File 'lib/manifest/compilable/simple_file.rb', line 10
def source_path
"src/#{name}"
end
|
#tile_type_name ⇒ Object
25
|
# File 'lib/manifest/compilable/simple_file.rb', line 25
def tile_type_name = "File"
|