Class: Passbook::StaticFile
- Inherits:
-
Object
- Object
- Passbook::StaticFile
- Defined in:
- lib/passbook/static_file.rb
Instance Attribute Summary collapse
-
#filename ⇒ Object
readonly
Returns the value of attribute filename.
Instance Method Summary collapse
- #content ⇒ Object
-
#initialize(name, path) ⇒ StaticFile
constructor
A new instance of StaticFile.
Constructor Details
#initialize(name, path) ⇒ StaticFile
Returns a new instance of StaticFile.
7 8 9 |
# File 'lib/passbook/static_file.rb', line 7 def initialize(name, path) @filename, @path = name, Pathname(path) end |
Instance Attribute Details
#filename ⇒ Object (readonly)
Returns the value of attribute filename.
5 6 7 |
# File 'lib/passbook/static_file.rb', line 5 def filename @filename end |
Instance Method Details
#content ⇒ Object
11 12 13 |
# File 'lib/passbook/static_file.rb', line 11 def content @content ||= @path.read end |