Class: Olivander::ApplicationContext::Company

Inherits:
Object
  • Object
show all
Defined in:
lib/olivander/application_context.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**kwargs) ⇒ Company

Returns a new instance of Company.



57
58
59
60
# File 'lib/olivander/application_context.rb', line 57

def initialize(**kwargs)
  self.url = kwargs[:url] || ENV['OLIVANDER_COMPANY_URL'] || '/'
  self.name = kwargs[:name] || ENV['OLIVANDER_COMPANY_NAME'] || 'Company Name'
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



55
56
57
# File 'lib/olivander/application_context.rb', line 55

def name
  @name
end

#urlObject

Returns the value of attribute url.



55
56
57
# File 'lib/olivander/application_context.rb', line 55

def url
  @url
end