Class: SublimeTextKit::Metadata::Pathway
- Inherits:
-
Struct
- Object
- Struct
- SublimeTextKit::Metadata::Pathway
- Defined in:
- lib/sublime_text_kit/metadata/pathway.rb
Overview
Defines metadata pathways.
Instance Attribute Summary collapse
-
#metadata_dir ⇒ Object
Returns the value of attribute metadata_dir.
-
#project_dir ⇒ Object
Returns the value of attribute project_dir.
Instance Method Summary collapse
-
#initialize(*arguments) ⇒ Pathway
constructor
A new instance of Pathway.
- #metadata_file(extension) ⇒ Object
- #project_name ⇒ Object
Constructor Details
#initialize(*arguments) ⇒ Pathway
Returns a new instance of Pathway.
9 10 11 12 |
# File 'lib/sublime_text_kit/metadata/pathway.rb', line 9 def initialize *arguments super each_pair { |key, value| self[key] = Pathname(value). } end |
Instance Attribute Details
#metadata_dir ⇒ Object
Returns the value of attribute metadata_dir
6 7 8 |
# File 'lib/sublime_text_kit/metadata/pathway.rb', line 6 def @metadata_dir end |
#project_dir ⇒ Object
Returns the value of attribute project_dir
6 7 8 |
# File 'lib/sublime_text_kit/metadata/pathway.rb', line 6 def project_dir @project_dir end |
Instance Method Details
#metadata_file(extension) ⇒ Object
16 |
# File 'lib/sublime_text_kit/metadata/pathway.rb', line 16 def (extension) = .join("#{project_name}.#{extension}") |
#project_name ⇒ Object
14 |
# File 'lib/sublime_text_kit/metadata/pathway.rb', line 14 def project_name = project_dir.basename |