Class: Elsmore::Writer
- Inherits:
-
Object
- Object
- Elsmore::Writer
- Defined in:
- lib/elsmore/writer.rb
Instance Attribute Summary collapse
-
#emitter ⇒ Object
Returns the value of attribute emitter.
-
#resource ⇒ Object
Returns the value of attribute resource.
Instance Method Summary collapse
- #canonical_filename ⇒ Object
-
#initialize(resource) ⇒ Writer
constructor
A new instance of Writer.
- #write ⇒ Object
Constructor Details
#initialize(resource) ⇒ Writer
Returns a new instance of Writer.
5 6 7 |
# File 'lib/elsmore/writer.rb', line 5 def initialize resource self.resource = resource end |
Instance Attribute Details
#emitter ⇒ Object
Returns the value of attribute emitter.
3 4 5 |
# File 'lib/elsmore/writer.rb', line 3 def emitter @emitter end |
#resource ⇒ Object
Returns the value of attribute resource.
3 4 5 |
# File 'lib/elsmore/writer.rb', line 3 def resource @resource end |
Instance Method Details
#canonical_filename ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/elsmore/writer.rb', line 13 def canonical_filename if host == parent_host "#{filename}" else "/#{host}#{filename}" end end |
#write ⇒ Object
9 10 11 |
# File 'lib/elsmore/writer.rb', line 9 def write write_file end |