Class: Avm::EacRubyBase1::Rubygems::VersionFile
- Inherits:
-
Object
- Object
- Avm::EacRubyBase1::Rubygems::VersionFile
- Defined in:
- lib/avm/eac_ruby_base1/rubygems/version_file.rb
Constant Summary collapse
- VERSION_LINE_PATTERN =
/\A(\s*)VERSION\s*=\s*[\'\"]([^\'\"]+)[\'\"](\s*)\z/.freeze
Instance Method Summary collapse
Instance Method Details
#value ⇒ Object
13 14 15 |
# File 'lib/avm/eac_ruby_base1/rubygems/version_file.rb', line 13 def value path.read.each_line.lazy.map { |line| line_value(line) }.find { |v| v } end |
#value=(new_value) ⇒ Object
17 18 19 |
# File 'lib/avm/eac_ruby_base1/rubygems/version_file.rb', line 17 def value=(new_value) path.write(new_value_content(new_value)) end |