Class: Lexicon::Common::Package::PackageFile
- Inherits:
-
Object
- Object
- Lexicon::Common::Package::PackageFile
- Defined in:
- lib/lexicon/common/package/package_file.rb
Instance Attribute Summary collapse
- #path ⇒ Pathname readonly
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#path ⇒ Pathname (readonly)
18 19 20 |
# File 'lib/lexicon/common/package/package_file.rb', line 18 def path @path end |
Class Method Details
.new_data(path) ⇒ Object
12 13 14 |
# File 'lib/lexicon/common/package/package_file.rb', line 12 def new_data(path) new(path, type: DATA) end |
.new_structure(path) ⇒ Object
8 9 10 |
# File 'lib/lexicon/common/package/package_file.rb', line 8 def new_structure(path) new(path, type: STRUCTURE) end |
Instance Method Details
#data? ⇒ Boolean
26 27 28 |
# File 'lib/lexicon/common/package/package_file.rb', line 26 def data? type == DATA end |
#structure? ⇒ Boolean
31 32 33 |
# File 'lib/lexicon/common/package/package_file.rb', line 31 def structure? type == STRUCTURE end |
#to_s ⇒ String
21 22 23 |
# File 'lib/lexicon/common/package/package_file.rb', line 21 def to_s path.to_s end |