Class: Library::Component
- Inherits:
-
Object
- Object
- Library::Component
- Defined in:
- app/models/library/component.rb
Instance Method Summary collapse
-
#initialize(file, rootDirectory, rootPath) ⇒ Component
constructor
A new instance of Component.
- #paths ⇒ Object
- #raw ⇒ Object
- #render ⇒ Object
Constructor Details
#initialize(file, rootDirectory, rootPath) ⇒ Component
Returns a new instance of Component.
3 4 5 6 7 |
# File 'app/models/library/component.rb', line 3 def initialize(file, rootDirectory, rootPath) @file = file @rootDirectory = rootDirectory @rootPath = rootPath end |
Instance Method Details
#paths ⇒ Object
17 18 19 |
# File 'app/models/library/component.rb', line 17 def paths parseLinks(@file, @rootDirectory) end |
#raw ⇒ Object
9 10 11 |
# File 'app/models/library/component.rb', line 9 def raw File.open(@file).read end |
#render ⇒ Object
13 14 15 |
# File 'app/models/library/component.rb', line 13 def render parseFile(@file, 'views') end |