class Microstation::Drawing::File
Attributes
creator[R]
keywords[R]
path[R]
Public Class Methods
from_drawing(drawing)
click to toggle source
# File lib/microstation/dir.rb, line 190 def self.from_drawing(drawing) file = new(drawing.path) file.get_meta(drawing) file end
new(path)
click to toggle source
# File lib/microstation/dir.rb, line 201 def initialize(path) @path = Pathname(path) end
Public Instance Methods
app_open_drawing(app, &block)
click to toggle source
# File lib/microstation/dir.rb, line 225 def app_open_drawing(app, &block) draw = app.open_drawing(self.path,&block) end
basename()
click to toggle source
# File lib/microstation/dir.rb, line 205 def basename @path.basename end
dirname()
click to toggle source
# File lib/microstation/dir.rb, line 209 def dirname @path.dirname end
drawing=(drawing)
click to toggle source
# File lib/microstation/dir.rb, line 213 def drawing=(drawing) @drawing = drawing end
get_meta(dwg)
click to toggle source
# File lib/microstation/dir.rb, line 233 def get_meta(dwg) @title = dwg.title @keywords = dwg.keywords @creator = dwg.creator end
mtime()
click to toggle source
# File lib/microstation/dir.rb, line 217 def mtime self.path.mtime end
open_drawing(&block)
click to toggle source
# File lib/microstation/dir.rb, line 229 def open_drawing(&block) Microstation.open_drawing(self.path,&block) end
title()
click to toggle source
# File lib/microstation/dir.rb, line 221 def title @title ||= get_meta end
to_path()
click to toggle source
# File lib/microstation/dir.rb, line 196 def to_path @path.to_path end