Class: SlnProject::ProjectBlock
- Defined in:
- lib/fastlane/plugin/sapfire/sln_project/project_block.rb
Constant Summary collapse
- START_TOKENS =
{ ProjectSectionToken: "ProjectSection" }.freeze
- END_TOKENS =
{ ProjectSectionToken: "EndProjectSection" }.freeze
Instance Attribute Summary collapse
-
#guid ⇒ Object
readonly
Returns the value of attribute guid.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
Instance Attribute Details
#guid ⇒ Object
Returns the value of attribute guid.
13 14 15 |
# File 'lib/fastlane/plugin/sapfire/sln_project/project_block.rb', line 13 def guid @guid end |
#name ⇒ Object
Returns the value of attribute name.
13 14 15 |
# File 'lib/fastlane/plugin/sapfire/sln_project/project_block.rb', line 13 def name @name end |
#path ⇒ Object
Returns the value of attribute path.
13 14 15 |
# File 'lib/fastlane/plugin/sapfire/sln_project/project_block.rb', line 13 def path @path end |
Instance Method Details
#parse(block_str) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/fastlane/plugin/sapfire/sln_project/project_block.rb', line 15 def parse(block_str) is_header_passed = false inner_block = nil inner_block_str = "" content_reader = StringIO.new(block_str) content_reader.each_line do |line| trim_line = line.strip unless is_header_passed is_header_passed = true if parse_header(trim_line) end 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 |
#to_s ⇒ Object
36 37 38 |
# File 'lib/fastlane/plugin/sapfire/sln_project/project_block.rb', line 36 def to_s name end |