Method: Spider::DataTypes::FilePath#map

Defined in:
lib/spiderfw/model/datatypes/file_path.rb

#map(mapper_type) ⇒ Object



16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/spiderfw/model/datatypes/file_path.rb', line 16

def map(mapper_type)
    val = nil
    if attributes[:base_path]
        begin
            val = self.relative_path_from(Pathname.new(attributes[:base_path]))
        rescue ArgumentError
            val = self
        end
    else
        val = self
    end
    val.to_s
end