Class: Maguro::Gemfile
- Inherits:
-
Object
- Object
- Maguro::Gemfile
- Defined in:
- lib/maguro/gemfile.rb
Instance Attribute Summary collapse
-
#builder ⇒ Object
readonly
Returns the value of attribute builder.
-
#file_name ⇒ Object
readonly
Returns the value of attribute file_name.
Instance Method Summary collapse
-
#initialize(builder) ⇒ Gemfile
constructor
A new instance of Gemfile.
- #remove(regex, replacement) ⇒ Object
Constructor Details
#initialize(builder) ⇒ Gemfile
Returns a new instance of Gemfile.
5 6 7 8 |
# File 'lib/maguro/gemfile.rb', line 5 def initialize(builder) @builder = builder @file_name = "Gemfile" end |
Instance Attribute Details
#builder ⇒ Object (readonly)
Returns the value of attribute builder.
3 4 5 |
# File 'lib/maguro/gemfile.rb', line 3 def builder @builder end |
#file_name ⇒ Object (readonly)
Returns the value of attribute file_name.
3 4 5 |
# File 'lib/maguro/gemfile.rb', line 3 def file_name @file_name end |
Instance Method Details
#remove(regex, replacement) ⇒ Object
10 11 12 |
# File 'lib/maguro/gemfile.rb', line 10 def remove(regex, replacement) builder.gsub_file(file_name, regex, replacement) end |