Class: Reflex::Packager::MacOSConfig
- Inherits:
-
Object
- Object
- Reflex::Packager::MacOSConfig
- Defined in:
- lib/reflex/packager/config.rb
Overview
macOS specific configuration.
Instance Attribute Summary collapse
-
#archs ⇒ Object
readonly
Returns the value of attribute archs.
-
#codesign_identity ⇒ Object
readonly
Returns the value of attribute codesign_identity.
-
#codesign_team_id ⇒ Object
readonly
Returns the value of attribute codesign_team_id.
-
#deployment_target ⇒ Object
readonly
Returns the value of attribute deployment_target.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(hash) ⇒ MacOSConfig
constructor
A new instance of MacOSConfig.
- #validate ⇒ Object
Constructor Details
#initialize(hash) ⇒ MacOSConfig
Returns a new instance of MacOSConfig.
158 159 160 161 162 163 164 |
# File 'lib/reflex/packager/config.rb', line 158 def initialize(hash) @deployment_target = hash[:deployment_target] .to_s @archs = Array(hash[:archs]).map &:to_s @codesign_identity = hash[:codesign][:identity].to_s @codesign_team_id = hash[:codesign][:team_id]&.to_s validate end |
Instance Attribute Details
#archs ⇒ Object (readonly)
Returns the value of attribute archs.
166 167 168 |
# File 'lib/reflex/packager/config.rb', line 166 def archs @archs end |
#codesign_identity ⇒ Object (readonly)
Returns the value of attribute codesign_identity.
166 167 168 |
# File 'lib/reflex/packager/config.rb', line 166 def codesign_identity @codesign_identity end |
#codesign_team_id ⇒ Object (readonly)
Returns the value of attribute codesign_team_id.
166 167 168 |
# File 'lib/reflex/packager/config.rb', line 166 def codesign_team_id @codesign_team_id end |
#deployment_target ⇒ Object (readonly)
Returns the value of attribute deployment_target.
166 167 168 |
# File 'lib/reflex/packager/config.rb', line 166 def deployment_target @deployment_target end |
Class Method Details
.defaults ⇒ Object
147 148 149 150 151 152 153 154 155 156 |
# File 'lib/reflex/packager/config.rb', line 147 def self.defaults() { deployment_target: '11.0', archs: 'arm64', codesign: { identity: '-', team_id: nil } } end |
Instance Method Details
#validate ⇒ Object
168 169 170 |
# File 'lib/reflex/packager/config.rb', line 168 def validate() raise Error, "invalid archs: '#{@archs}'" if @archs.empty? end |