Class: Fastlane::Helper::ReleaseNoteShortMetadataBlock
- Inherits:
-
ReleaseNoteMetadataBlock
- Object
- MetadataBlock
- StandardMetadataBlock
- ReleaseNoteMetadataBlock
- Fastlane::Helper::ReleaseNoteShortMetadataBlock
- Defined in:
- lib/fastlane/plugin/wpmreleasetoolkit/helper/metadata/release_note_short_metadata_block.rb
Instance Attribute Summary
Attributes inherited from ReleaseNoteMetadataBlock
#keep_key, #new_key, #rel_note_key, #release_version
Attributes inherited from StandardMetadataBlock
Attributes inherited from MetadataBlock
Instance Method Summary collapse
- #generate_block(file) ⇒ Object
-
#initialize(block_key, content_file_path, release_version) ⇒ ReleaseNoteShortMetadataBlock
constructor
A new instance of ReleaseNoteShortMetadataBlock.
- #is_handler_for(key) ⇒ Object
Methods inherited from ReleaseNoteMetadataBlock
#extract_key, #generate_keys, #handle_line, #is_int?
Methods inherited from StandardMetadataBlock
Methods inherited from MetadataBlock
Constructor Details
#initialize(block_key, content_file_path, release_version) ⇒ ReleaseNoteShortMetadataBlock
Returns a new instance of ReleaseNoteShortMetadataBlock.
6 7 8 9 10 11 |
# File 'lib/fastlane/plugin/wpmreleasetoolkit/helper/metadata/release_note_short_metadata_block.rb', line 6 def initialize(block_key, content_file_path, release_version) super @rel_note_key = 'release_note_short' @release_version = release_version generate_keys(release_version) end |
Instance Method Details
#generate_block(file) ⇒ Object
18 19 20 |
# File 'lib/fastlane/plugin/wpmreleasetoolkit/helper/metadata/release_note_short_metadata_block.rb', line 18 def generate_block(file) super unless File.empty?(@content_file_path) end |
#is_handler_for(key) ⇒ Object
13 14 15 16 |
# File 'lib/fastlane/plugin/wpmreleasetoolkit/helper/metadata/release_note_short_metadata_block.rb', line 13 def is_handler_for(key) values = key.split('_') key.start_with?(@rel_note_key) && values.length == 4 && is_int?(values[3].sub(/^0*/, '')) end |