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.
471 472 473 474 475 476 477 478 479 480 481 482 483 484 |
# File 'lib/goodguide/gibbon.rb', line 471 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.
469 470 471 |
# File 'lib/goodguide/gibbon.rb', line 469 def client @client end |
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
470 471 472 |
# File 'lib/goodguide/gibbon.rb', line 470 def logger @logger end |
Class Method Details
.default ⇒ Object
449 450 451 |
# File 'lib/goodguide/gibbon.rb', line 449 def self.default @default ||= new end |
Instance Method Details
#gibbon ⇒ Object
486 487 488 |
# File 'lib/goodguide/gibbon.rb', line 486 def gibbon self[:Gibbon] end |