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