Class: Fontist::Import::Files::CollectionFile
- Inherits:
-
Object
- Object
- Fontist::Import::Files::CollectionFile
- Defined in:
- lib/fontist/import/files/collection_file.rb
Instance Attribute Summary collapse
-
#fonts ⇒ Object
readonly
Returns the value of attribute fonts.
Instance Method Summary collapse
- #filename ⇒ Object
-
#initialize(path) ⇒ CollectionFile
constructor
A new instance of CollectionFile.
- #source_filename ⇒ Object
Constructor Details
#initialize(path) ⇒ CollectionFile
Returns a new instance of CollectionFile.
11 12 13 14 15 |
# File 'lib/fontist/import/files/collection_file.rb', line 11 def initialize(path) @path = path @fonts = read @extension = detect_extension end |
Instance Attribute Details
#fonts ⇒ Object (readonly)
Returns the value of attribute fonts.
9 10 11 |
# File 'lib/fontist/import/files/collection_file.rb', line 9 def fonts @fonts end |
Instance Method Details
#filename ⇒ Object
17 18 19 |
# File 'lib/fontist/import/files/collection_file.rb', line 17 def filename File.basename(@path, ".*") + "." + @extension end |
#source_filename ⇒ Object
21 22 23 |
# File 'lib/fontist/import/files/collection_file.rb', line 21 def source_filename File.basename(@path) unless filename == File.basename(@path) end |