Class: ODDB::Plugin::SessionStub

Inherits:
Object
  • Object
show all
Defined in:
src/plugin/plugin.rb

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (SessionStub) initialize(app)

A new instance of SessionStub



16
17
18
19
20
21
22
23
24
# File 'src/plugin/plugin.rb', line 16

def initialize(app)
  @app = app
  @flavor = Session::DEFAULT_FLAVOR
  @http_protocol = 'http'
  @server_name = SERVER_NAME
  @default_language = 'de'
  @currency_rates = {}
  @currency = 'CHF'
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

- (Object) method_missing(*args)



28
29
# File 'src/plugin/plugin.rb', line 28

def method_missing(*args)
end

Instance Attribute Details

- (Object) app (readonly)

Returns the value of attribute app



13
14
15
# File 'src/plugin/plugin.rb', line 13

def app
  @app
end

- (Object) currency (readonly)

Returns the value of attribute currency



13
14
15
# File 'src/plugin/plugin.rb', line 13

def currency
  @currency
end

- (Object) default_language (readonly)

Returns the value of attribute default_language



13
14
15
# File 'src/plugin/plugin.rb', line 13

def default_language
  @default_language
end

- (Object) flavor (readonly)

Returns the value of attribute flavor



13
14
15
# File 'src/plugin/plugin.rb', line 13

def flavor
  @flavor
end

- (Object) http_protocol (readonly)

Returns the value of attribute http_protocol



13
14
15
# File 'src/plugin/plugin.rb', line 13

def http_protocol
  @http_protocol
end

- (Object) language

Returns the value of attribute language



15
16
17
# File 'src/plugin/plugin.rb', line 15

def language
  @language
end

- (Object) lookandfeel

Returns the value of attribute lookandfeel



15
16
17
# File 'src/plugin/plugin.rb', line 15

def lookandfeel
  @lookandfeel
end

- (Object) server_name (readonly)

Returns the value of attribute server_name



13
14
15
# File 'src/plugin/plugin.rb', line 13

def server_name
  @server_name
end

Instance Method Details

- (Object) get_currency_rate(currency)



25
26
27
# File 'src/plugin/plugin.rb', line 25

def get_currency_rate(currency)
  @currency_rates[currency] ||= @app.get_currency_rate(currency)
end