Class: Raykit::Version
- Inherits:
-
Object
- Object
- Raykit::Version
- Defined in:
- lib/raykit/version.rb
Instance Attribute Summary collapse
-
#start_time ⇒ Object
Returns the value of attribute start_time.
Class Method Summary collapse
Instance Attribute Details
#start_time ⇒ Object
Returns the value of attribute start_time.
3 4 5 |
# File 'lib/raykit/version.rb', line 3 def start_time @start_time end |
Class Method Details
.detect ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/raykit/version.rb', line 5 def self.detect if(defined?(NAME)) csproj_filename = "#{NAME}/#{NAME}.csproj" if(File.exists?(csproj_filename)) return IO.read(cs_proj_filename).match(/<Version>([\d.]+)</).captures[0] end gemspec_filename = "#{NAME}.gemspec" if(File.exists?(gemspec_filename)) return IO.read(gemspec_filename).match(/version[\s]+=[\s]+['"]([\w.]+)['"]/).captures[0] end end '0.0.0' end |