Class: FabricConfig
- Inherits:
-
Object
- Object
- FabricConfig
- Defined in:
- lib/motion-fabric.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#beta_block ⇒ Object
Returns the value of attribute beta_block.
-
#build_secret ⇒ Object
Returns the value of attribute build_secret.
-
#kits ⇒ Object
Returns the value of attribute kits.
Instance Method Summary collapse
- #beta(&block) ⇒ Object
-
#initialize(config) ⇒ FabricConfig
constructor
A new instance of FabricConfig.
- #kit(name, &block) ⇒ Object
Constructor Details
#initialize(config) ⇒ FabricConfig
Returns a new instance of FabricConfig.
56 57 58 59 60 |
# File 'lib/motion-fabric.rb', line 56 def initialize(config) @config = config config.info_plist['Fabric'] ||= {} config.info_plist['Fabric']['Kits'] ||= [] end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
49 50 51 |
# File 'lib/motion-fabric.rb', line 49 def api_key @api_key end |
#beta_block ⇒ Object
Returns the value of attribute beta_block.
49 50 51 |
# File 'lib/motion-fabric.rb', line 49 def beta_block @beta_block end |
#build_secret ⇒ Object
Returns the value of attribute build_secret.
49 50 51 |
# File 'lib/motion-fabric.rb', line 49 def build_secret @build_secret end |
#kits ⇒ Object
Returns the value of attribute kits.
49 50 51 |
# File 'lib/motion-fabric.rb', line 49 def kits @kits end |
Instance Method Details
#beta(&block) ⇒ Object
68 69 70 |
# File 'lib/motion-fabric.rb', line 68 def beta(&block) @beta_block = block if block end |
#kit(name, &block) ⇒ Object
62 63 64 65 66 |
# File 'lib/motion-fabric.rb', line 62 def kit(name, &block) kit_config = FabricKitConfig.new(name) block.call(kit_config.info) if block @config.info_plist['Fabric']['Kits'] << kit_config.to_hash end |