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