Module: Xcode::Configuration::BooleanProperty
- Extended by:
- BooleanProperty
- Included in:
- BooleanProperty
- Defined in:
- lib/xcode/configurations/boolean_property.rb
Overview
Within the a build settings for a configuration there are a number of settings that are stored as Objective-C boolean values. This helper module provides the opening and saving of these values.
When opened the value returns is going to be an Array.
Instance Method Summary collapse
- #append(original, value) ⇒ Object
-
#open(value) ⇒ TrueClass, FalseClass
The boolean value based on the specified value.
-
#save(value) ⇒ String
YES or NO.
Instance Method Details
#append(original, value) ⇒ Object
Note:
Appending boolean properties has no real good default operation. What happens in this case is that whatever you decide to append will automatically override the previously existing settings.
47 48 49 |
# File 'lib/xcode/configurations/boolean_property.rb', line 47 def append(original,value) save(value) end |
#open(value) ⇒ TrueClass, FalseClass
Returns the boolean value based on the specified value.
27 28 29 |
# File 'lib/xcode/configurations/boolean_property.rb', line 27 def open(value) value.to_s =~ /^YES$/ end |
#save(value) ⇒ String
Returns YES or NO.
35 36 37 |
# File 'lib/xcode/configurations/boolean_property.rb', line 35 def save(value) value.to_s =~ /^(?:NO|false)$/ ? "NO" : "YES" end |