lib/olivander/application_context.rb in five-two-nw-olivander-0.2.0.5 vs lib/olivander/application_context.rb in five-two-nw-olivander-0.2.0.6

- old
+ new

@@ -1,12 +1,13 @@ module Olivander class ApplicationContext - attr_accessor :name, :logo, :company, :menu_items, :route_builder, :sign_out_path, :sidebar_background_class + attr_accessor :name, :logo, :login_logo, :company, :menu_items, :route_builder, :sign_out_path, :sidebar_background_class def initialize(**kwargs) self.name = kwargs[:name] || ENV['OLIVANDER_APP_NAME'] || 'Application Name' self.logo = kwargs[:logo] || Logo.new(url: kwargs[:logo_url], alt: kwargs[:logo_alt]) + self.login_logo = kwargs[:login_logo] || LoginLogo.new(url: kwargs[:login_logo_url], alt: kwargs[:login_logo_alt]) self.company = kwargs[:company] || Company.new(name: kwargs[:company_name], url: kwargs[:company_url]) self.sign_out_path = kwargs[:sign_out_path] || '/sign_out' self.menu_items = kwargs[:menu_items] || [] begin self.route_builder = RouteBuilder.new @@ -36,9 +37,18 @@ attr_accessor :url, :alt def initialize(**kwargs) self.url = kwargs[:url] || ENV['OLIVANDER_LOGO_URL'] || '/images/olivander_logo.png' self.alt = kwargs[:alt] || ENV['OLIVANDER_LOGO_ALT'] || 'Logo Image' + end + end + + class LoginLogo + attr_accessor :url, :alt + + def initialize(**kwargs) + self.url = kwargs[:url] || ENV['OLIVANDER_LOGIN_LOGO_URL'] || '/images/olivander_login_logo.png' + self.alt = kwargs[:alt] || ENV['OLIVANDER_LOGIN_LOGO_ALT'] || 'Login Logo Image' end end class Company attr_accessor :name, :url