Class: Releaser::FromFile
- Inherits:
-
Object
- Object
- Releaser::FromFile
- Defined in:
- lib/releaser/from_file.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(file_name = File.join(Rails.root, "CURRENT_VERSION")) ⇒ FromFile
constructor
A new instance of FromFile.
- #version(default = "development") ⇒ Object
Constructor Details
#initialize(file_name = File.join(Rails.root, "CURRENT_VERSION")) ⇒ FromFile
Returns a new instance of FromFile.
5 6 7 |
# File 'lib/releaser/from_file.rb', line 5 def initialize(file_name = File.join(Rails.root, "CURRENT_VERSION")) self.name = file_name end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/releaser/from_file.rb', line 3 def name @name end |
Instance Method Details
#version(default = "development") ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/releaser/from_file.rb', line 9 def version(default = "development") if exists? from_file else default end end |