Class: Microstation::Directory
- Inherits:
-
Object
- Object
- Microstation::Directory
- Defined in:
- lib/microstation/directory.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Class Method Summary collapse
Instance Method Summary collapse
- #cell_libraries ⇒ Object
- #drawings ⇒ Object
- #find_drawing(name) ⇒ Object
-
#initialize(dir) ⇒ Directory
constructor
A new instance of Directory.
- #plot_drivers ⇒ Object
- #templates ⇒ Object
- #to_path ⇒ Object
Constructor Details
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
11 12 13 |
# File 'lib/microstation/directory.rb', line 11 def path @path end |
Class Method Details
.drawings_in_dir(dir) ⇒ Object
7 8 9 |
# File 'lib/microstation/directory.rb', line 7 def self.drawings_in_dir(dir) new(dir).drawings end |
Instance Method Details
#cell_libraries ⇒ Object
33 34 35 |
# File 'lib/microstation/directory.rb', line 33 def cell_libraries Pathname.glob(path + "*.cel") end |
#drawings ⇒ Object
25 26 27 |
# File 'lib/microstation/directory.rb', line 25 def drawings Pathname.glob(path + "*.d{gn,wg}") end |
#find_drawing(name) ⇒ Object
21 22 23 |
# File 'lib/microstation/directory.rb', line 21 def find_drawing(name) drawings.find { |pn| pn.to_s == name } end |
#plot_drivers ⇒ Object
29 30 31 |
# File 'lib/microstation/directory.rb', line 29 def plot_drivers Pathname.glob(path + "*.pltcfg") end |
#templates ⇒ Object
37 38 39 |
# File 'lib/microstation/directory.rb', line 37 def templates Pathname.glob(path + "*.yaml") end |
#to_path ⇒ Object
17 18 19 |
# File 'lib/microstation/directory.rb', line 17 def to_path path end |