Class: SlnProject::GlobalBlock

Inherits:
BaseBlock show all
Defined in:
lib/fastlane/plugin/sapfire/sln_project/global_block.rb

Constant Summary collapse

START_TOKENS =
{
  GlobalSectionToken: "GlobalSection"
}.freeze
END_TOKENS =
{
  GlobalSectionToken: "EndGlobalSection"
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#solution_configuration_platformsObject

Returns the value of attribute solution_configuration_platforms.



13
14
15
# File 'lib/fastlane/plugin/sapfire/sln_project/global_block.rb', line 13

def solution_configuration_platforms
  @solution_configuration_platforms
end

#solution_propertiesObject

Returns the value of attribute solution_properties.



13
14
15
# File 'lib/fastlane/plugin/sapfire/sln_project/global_block.rb', line 13

def solution_properties
  @solution_properties
end

Instance Method Details

#parse(block_str) ⇒ Object



15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/fastlane/plugin/sapfire/sln_project/global_block.rb', line 15

def parse(block_str)
  inner_block = nil
  inner_block_str = ""
  content_reader = StringIO.new(block_str)

  content_reader.each_line do |line|
    trim_line = line.strip
    inner_block = check_start_token(trim_line, inner_block)
    inner_block = check_end_token(trim_line, inner_block, inner_block_str)

    inner_block_str += "#{trim_line}\n" unless inner_block.nil?
    inner_block_str = "" if inner_block.nil?
  end
end