Class: Gluey::Tools::Asset

Inherits:
Struct
  • Object
show all
Defined in:
lib/gluey/tools/local_build.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#pathObject

Returns the value of attribute path



67
68
69
# File 'lib/gluey/tools/local_build.rb', line 67

def path
  @path
end

#time_stampObject

Returns the value of attribute time_stamp



67
68
69
# File 'lib/gluey/tools/local_build.rb', line 67

def time_stamp
  @time_stamp
end

Class Method Details

.try_create(file) ⇒ Object



69
70
71
72
73
# File 'lib/gluey/tools/local_build.rb', line 69

def self.try_create(file)
  file.match /^([^\.]+)\.(\d+)\.(\w+)$/ do |m|
    new "#{m[1]}.#{m[3]}", m[2]
  end
end

Instance Method Details

#<=>(other) ⇒ Object



75
76
77
# File 'lib/gluey/tools/local_build.rb', line 75

def <=>(other)
  time_stamp <=> other.time_stamp
end

#orig_pathObject



79
80
81
82
# File 'lib/gluey/tools/local_build.rb', line 79

def orig_path
  ret = path.dup
  ret.insert ret.rindex('.'), ".#{time_stamp}"
end