Class: Sparrowhawk::FileEntry
- Inherits:
-
Object
- Object
- Sparrowhawk::FileEntry
- Defined in:
- lib/sparrowhawk/file_entry.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
Instance Method Summary collapse
- #content ⇒ Object
-
#initialize(entry_name, file_name) ⇒ FileEntry
constructor
A new instance of FileEntry.
Constructor Details
#initialize(entry_name, file_name) ⇒ FileEntry
Returns a new instance of FileEntry.
7 8 9 10 |
# File 'lib/sparrowhawk/file_entry.rb', line 7 def initialize entry_name, file_name @name = entry_name @source = file_name end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/sparrowhawk/file_entry.rb', line 5 def name @name end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
5 6 7 |
# File 'lib/sparrowhawk/file_entry.rb', line 5 def source @source end |
Instance Method Details
#content ⇒ Object
12 13 14 |
# File 'lib/sparrowhawk/file_entry.rb', line 12 def content IO.read(source) end |