Class: Appydave::Tools::Configuration::Models::BrandsConfig::BrandInfo
- Inherits:
-
Object
- Object
- Appydave::Tools::Configuration::Models::BrandsConfig::BrandInfo
- Defined in:
- lib/appydave/tools/configuration/models/brands_config.rb
Overview
Type-safe class to access brand properties
Instance Attribute Summary collapse
-
#aws ⇒ Object
Returns the value of attribute aws.
-
#git_remote ⇒ Object
Returns the value of attribute git_remote.
-
#key ⇒ Object
Returns the value of attribute key.
-
#locations ⇒ Object
Returns the value of attribute locations.
-
#name ⇒ Object
Returns the value of attribute name.
-
#settings ⇒ Object
Returns the value of attribute settings.
-
#shortcut ⇒ Object
Returns the value of attribute shortcut.
-
#team ⇒ Object
Returns the value of attribute team.
-
#type ⇒ Object
Returns the value of attribute type.
-
#youtube_channels ⇒ Object
Returns the value of attribute youtube_channels.
Instance Method Summary collapse
-
#initialize(key, data) ⇒ BrandInfo
constructor
A new instance of BrandInfo.
- #to_h ⇒ Object
Constructor Details
#initialize(key, data) ⇒ BrandInfo
Returns a new instance of BrandInfo.
169 170 171 172 173 174 175 176 177 178 179 180 |
# File 'lib/appydave/tools/configuration/models/brands_config.rb', line 169 def initialize(key, data) @key = key @name = data['name'] @shortcut = data['shortcut'] @type = data['type'] || 'owned' @youtube_channels = data['youtube_channels'] || [] @team = data['team'] || [] @git_remote = data['git_remote'] @locations = BrandLocation.new(data['locations'] || {}) @aws = BrandAws.new(data['aws'] || {}) @settings = BrandSettings.new(data['settings'] || {}) end |
Instance Attribute Details
#aws ⇒ Object
Returns the value of attribute aws.
167 168 169 |
# File 'lib/appydave/tools/configuration/models/brands_config.rb', line 167 def aws @aws end |
#git_remote ⇒ Object
Returns the value of attribute git_remote.
167 168 169 |
# File 'lib/appydave/tools/configuration/models/brands_config.rb', line 167 def git_remote @git_remote end |
#key ⇒ Object
Returns the value of attribute key.
167 168 169 |
# File 'lib/appydave/tools/configuration/models/brands_config.rb', line 167 def key @key end |
#locations ⇒ Object
Returns the value of attribute locations.
167 168 169 |
# File 'lib/appydave/tools/configuration/models/brands_config.rb', line 167 def locations @locations end |
#name ⇒ Object
Returns the value of attribute name.
167 168 169 |
# File 'lib/appydave/tools/configuration/models/brands_config.rb', line 167 def name @name end |
#settings ⇒ Object
Returns the value of attribute settings.
167 168 169 |
# File 'lib/appydave/tools/configuration/models/brands_config.rb', line 167 def settings @settings end |
#shortcut ⇒ Object
Returns the value of attribute shortcut.
167 168 169 |
# File 'lib/appydave/tools/configuration/models/brands_config.rb', line 167 def shortcut @shortcut end |
#team ⇒ Object
Returns the value of attribute team.
167 168 169 |
# File 'lib/appydave/tools/configuration/models/brands_config.rb', line 167 def team @team end |
#type ⇒ Object
Returns the value of attribute type.
167 168 169 |
# File 'lib/appydave/tools/configuration/models/brands_config.rb', line 167 def type @type end |
#youtube_channels ⇒ Object
Returns the value of attribute youtube_channels.
167 168 169 |
# File 'lib/appydave/tools/configuration/models/brands_config.rb', line 167 def youtube_channels @youtube_channels end |
Instance Method Details
#to_h ⇒ Object
182 183 184 185 186 187 188 189 190 191 192 193 194 |
# File 'lib/appydave/tools/configuration/models/brands_config.rb', line 182 def to_h { 'name' => @name, 'shortcut' => @shortcut, 'type' => @type, 'youtube_channels' => @youtube_channels, 'team' => @team, 'git_remote' => @git_remote, 'locations' => @locations.to_h, 'aws' => @aws.to_h, 'settings' => @settings.to_h } end |