Class: GoodGuide::Gibbon::JS
Defined Under Namespace
Classes: Console
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
Class Method Summary collapse
Instance Method Summary collapse
- #gibbon ⇒ Object
-
#initialize(opts = {}) ⇒ JS
constructor
A new instance of JS.
Constructor Details
#initialize(opts = {}) ⇒ JS
Returns a new instance of JS.
551 552 553 554 555 556 557 558 559 560 561 562 563 564 |
# File 'lib/goodguide/gibbon.rb', line 551 def initialize(opts={}) super() @debug = opts[:debug] @logger = @debug.respond_to?(:info) ? @debug : Logger.new($stdout) self[:console] = Console.new(@logger) if @debug load GoodGuide::Gibbon.dev_js_lib.to_s else load GoodGuide::Gibbon.js_lib.to_s end end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
549 550 551 |
# File 'lib/goodguide/gibbon.rb', line 549 def client @client end |
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
550 551 552 |
# File 'lib/goodguide/gibbon.rb', line 550 def logger @logger end |
Class Method Details
.default ⇒ Object
529 530 531 |
# File 'lib/goodguide/gibbon.rb', line 529 def self.default @default ||= new end |
Instance Method Details
#gibbon ⇒ Object
566 567 568 |
# File 'lib/goodguide/gibbon.rb', line 566 def gibbon self[:Gibbon] end |