Class: Fastlane::Helper::ReleaseNoteShortMetadataBlock

Inherits:
ReleaseNoteMetadataBlock show all
Defined in:
lib/fastlane/plugin/wpmreleasetoolkit/helper/an_metadata_update_helper.rb

Instance Attribute Summary

Attributes inherited from ReleaseNoteMetadataBlock

#keep_key, #new_key, #rel_note_key, #release_version

Attributes inherited from StandardMetadataBlock

#content_file_path

Attributes inherited from MetadataBlock

#block_key

Instance Method Summary collapse

Methods inherited from ReleaseNoteMetadataBlock

#extract_key, #generate_keys, #handle_line, #is_int?

Methods inherited from StandardMetadataBlock

#handle_line

Methods inherited from MetadataBlock

#handle_line

Constructor Details

#initialize(block_key, content_file_path, release_version) ⇒ ReleaseNoteShortMetadataBlock

Returns a new instance of ReleaseNoteShortMetadataBlock.



135
136
137
138
139
140
# File 'lib/fastlane/plugin/wpmreleasetoolkit/helper/an_metadata_update_helper.rb', line 135

def initialize(block_key, content_file_path, release_version)
  super(block_key, content_file_path, release_version)
  @rel_note_key = 'release_note_short'
  @release_version = release_version
  generate_keys(release_version)
end

Instance Method Details

#generate_block(fw) ⇒ Object



147
148
149
# File 'lib/fastlane/plugin/wpmreleasetoolkit/helper/an_metadata_update_helper.rb', line 147

def generate_block(fw)
  super(fw) unless File.zero?(@content_file_path)
end

#is_handler_for(key) ⇒ Object



142
143
144
145
# File 'lib/fastlane/plugin/wpmreleasetoolkit/helper/an_metadata_update_helper.rb', line 142

def is_handler_for(key)
  values = key.split('_')
  key.start_with?(@rel_note_key) && values.length == 4 && is_int?(values[3].sub(/^0*/, ''))
end