Class: GoodGuide::Gibbon::JS
- Inherits:
-
V8::Context
- Object
- V8::Context
- GoodGuide::Gibbon::JS
- Defined in:
- lib/goodguide/gibbon.rb
Defined Under Namespace
Classes: Console
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
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.
325 326 327 328 329 330 331 332 333 334 335 336 |
# File 'lib/goodguide/gibbon.rb', line 325 def initialize(opts={}) super() @debug = opts[:debug] self[:console] = Console.new if @debug load GoodGuide::Gibbon.dev_js_lib else load GoodGuide::Gibbon.js_lib end end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
324 325 326 |
# File 'lib/goodguide/gibbon.rb', line 324 def client @client end |
Class Method Details
.default ⇒ Object
314 315 316 |
# File 'lib/goodguide/gibbon.rb', line 314 def self.default @default ||= new end |
Instance Method Details
#gibbon ⇒ Object
338 339 340 |
# File 'lib/goodguide/gibbon.rb', line 338 def gibbon self[:Gibbon] end |