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.
572 573 574 575 576 577 578 579 580 581 582 583 584 585 |
# File 'lib/goodguide/gibbon.rb', line 572 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.
570 571 572 |
# File 'lib/goodguide/gibbon.rb', line 570 def client @client end |
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
571 572 573 |
# File 'lib/goodguide/gibbon.rb', line 571 def logger @logger end |
Class Method Details
.default ⇒ Object
550 551 552 |
# File 'lib/goodguide/gibbon.rb', line 550 def self.default @default ||= new end |
Instance Method Details
#gibbon ⇒ Object
587 588 589 |
# File 'lib/goodguide/gibbon.rb', line 587 def gibbon self[:Gibbon] end |