Class: RakeVersion::Copier
- Inherits:
-
Object
- Object
- RakeVersion::Copier
- Defined in:
- lib/rake-version/copier.rb
Instance Method Summary collapse
- #copy(version, context) ⇒ Object
-
#initialize(*args) ⇒ Copier
constructor
A new instance of Copier.
Constructor Details
#initialize(*args) ⇒ Copier
Returns a new instance of Copier.
7 8 9 10 11 12 13 |
# File 'lib/rake-version/copier.rb', line 7 def initialize *args = args.last.kind_of?(Hash) ? args.pop : {} @file_patterns = args.collect{ |arg| check_file_pattern arg } @version_pattern = Version::REGEXP @replace_all = !![:all] end |
Instance Method Details
#copy(version, context) ⇒ Object
15 16 17 |
# File 'lib/rake-version/copier.rb', line 15 def copy version, context find_all_files(context).each{ |f| copy_version f, version } end |