Class: BBRow
- Inherits:
-
Object
- Object
- BBRow
- Defined in:
- lib/cocoapods-privacy/privacy/PrivacyModule.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
Returns the value of attribute content.
-
#is_comment ⇒ Object
Returns the value of attribute is_comment.
-
#is_spec_end ⇒ Object
Returns the value of attribute is_spec_end.
-
#is_spec_start ⇒ Object
Returns the value of attribute is_spec_start.
-
#key ⇒ Object
Returns the value of attribute key.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(content, is_comment = false, is_spec_start = false, is_spec_end = false) ⇒ BBRow
constructor
A new instance of BBRow.
- #parse_key_value ⇒ Object
Constructor Details
#initialize(content, is_comment = false, is_spec_start = false, is_spec_end = false) ⇒ BBRow
Returns a new instance of BBRow.
13 14 15 16 17 18 19 20 |
# File 'lib/cocoapods-privacy/privacy/PrivacyModule.rb', line 13 def initialize(content, is_comment=false, is_spec_start=false, is_spec_end=false) @content = content @is_comment = is_comment @is_spec_start = is_spec_start @is_spec_end = is_spec_end parse_key_value end |
Instance Attribute Details
#content ⇒ Object
Returns the value of attribute content.
11 12 13 |
# File 'lib/cocoapods-privacy/privacy/PrivacyModule.rb', line 11 def content @content end |
#is_comment ⇒ Object
Returns the value of attribute is_comment.
11 12 13 |
# File 'lib/cocoapods-privacy/privacy/PrivacyModule.rb', line 11 def is_comment @is_comment end |
#is_spec_end ⇒ Object
Returns the value of attribute is_spec_end.
11 12 13 |
# File 'lib/cocoapods-privacy/privacy/PrivacyModule.rb', line 11 def is_spec_end @is_spec_end end |
#is_spec_start ⇒ Object
Returns the value of attribute is_spec_start.
11 12 13 |
# File 'lib/cocoapods-privacy/privacy/PrivacyModule.rb', line 11 def is_spec_start @is_spec_start end |
#key ⇒ Object
Returns the value of attribute key.
11 12 13 |
# File 'lib/cocoapods-privacy/privacy/PrivacyModule.rb', line 11 def key @key end |
#value ⇒ Object
Returns the value of attribute value.
11 12 13 |
# File 'lib/cocoapods-privacy/privacy/PrivacyModule.rb', line 11 def value @value end |
Instance Method Details
#parse_key_value ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/cocoapods-privacy/privacy/PrivacyModule.rb', line 22 def parse_key_value # 在这里添加提取 key 和 value 的逻辑 if @content.include?('=') key_value_split = @content.split('=') @key = key_value_split[0] @value = key_value_split[1..-1].join('=') else @key = nil @value = nil end end |