Class: Greeve::Application
- Inherits:
-
Object
- Object
- Greeve::Application
- Defined in:
- lib/greeve/application.rb
Overview
Information about the application Greeve is being used in. This info is used to generate a custom user-agent as recommended by CCP so that the application can be identified.
Class Method Summary collapse
-
.user_agent ⇒ String
Application's HTTP user-agent.
- .user_agent=(user_agent) ⇒ Object
Instance Method Summary collapse
-
#initialize ⇒ Application
constructor
A new instance of Application.
Constructor Details
#initialize ⇒ Application
Returns a new instance of Application
22 23 24 |
# File 'lib/greeve/application.rb', line 22 def initialize raise TypeError, "Cannot instantiate a singleton" end |
Class Method Details
.user_agent ⇒ String
Returns Application's HTTP user-agent
9 10 11 |
# File 'lib/greeve/application.rb', line 9 def self.user_agent @user_agent ||= "Unspecified".freeze end |
.user_agent=(user_agent) ⇒ Object
14 15 16 17 18 19 |
# File 'lib/greeve/application.rb', line 14 def self.user_agent=(user_agent) @user_agent = user_agent Typhoeus::Config.user_agent = Greeve::BaseItem.user_agent @user_agent end |