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.
162 163 164 165 166 167 168 |
# File 'lib/reflex/packager/config.rb', line 162 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.
170 171 172 |
# File 'lib/reflex/packager/config.rb', line 170 def archs @archs end |
#codesign_identity ⇒ Object (readonly)
Returns the value of attribute codesign_identity.
170 171 172 |
# File 'lib/reflex/packager/config.rb', line 170 def codesign_identity @codesign_identity end |
#codesign_team_id ⇒ Object (readonly)
Returns the value of attribute codesign_team_id.
170 171 172 |
# File 'lib/reflex/packager/config.rb', line 170 def codesign_team_id @codesign_team_id end |
#deployment_target ⇒ Object (readonly)
Returns the value of attribute deployment_target.
170 171 172 |
# File 'lib/reflex/packager/config.rb', line 170 def deployment_target @deployment_target end |
Class Method Details
.defaults ⇒ Object
151 152 153 154 155 156 157 158 159 160 |
# File 'lib/reflex/packager/config.rb', line 151 def self.defaults() { deployment_target: '11.0', archs: 'arm64', codesign: { identity: '-', team_id: nil } } end |
Instance Method Details
#validate ⇒ Object
172 173 174 |
# File 'lib/reflex/packager/config.rb', line 172 def validate() raise Error, "invalid archs: '#{@archs}'" if @archs.empty? end |