Class: Gluey::Tools::Asset
- Inherits:
-
Struct
- Object
- Struct
- Gluey::Tools::Asset
- Defined in:
- lib/gluey/tools/local_build.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
Returns the value of attribute path.
-
#time_stamp ⇒ Object
Returns the value of attribute time_stamp.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#path ⇒ Object
Returns the value of attribute path
67 68 69 |
# File 'lib/gluey/tools/local_build.rb', line 67 def path @path end |
#time_stamp ⇒ Object
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_path ⇒ Object
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 |