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.
13 14 15 |
# File 'lib/microstation/directory.rb', line 13 def path @path end |
Class Method Details
.drawings_in_dir(dir) ⇒ Object
9 10 11 |
# File 'lib/microstation/directory.rb', line 9 def self.drawings_in_dir(dir) new(dir).drawings end |
Instance Method Details
#cell_libraries ⇒ Object
35 36 37 |
# File 'lib/microstation/directory.rb', line 35 def cell_libraries Pathname.glob(path + "*.cel") end |
#drawings ⇒ Object
27 28 29 |
# File 'lib/microstation/directory.rb', line 27 def drawings Pathname.glob(path + "*.d{gn,wg}") end |
#find_drawing(name) ⇒ Object
23 24 25 |
# File 'lib/microstation/directory.rb', line 23 def find_drawing(name) drawings.find{|pn| pn.to_s == name } end |
#plot_drivers ⇒ Object
31 32 33 |
# File 'lib/microstation/directory.rb', line 31 def plot_drivers Pathname.glob(path + "*.pltcfg") end |
#templates ⇒ Object
39 40 41 |
# File 'lib/microstation/directory.rb', line 39 def templates Pathname.glob(path + '*.yaml') end |
#to_path ⇒ Object
19 20 21 |
# File 'lib/microstation/directory.rb', line 19 def to_path path end |