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
291 292 293 294 295 296 297 298 299 300 301 302 |
# File 'lib/goodguide/gibbon.rb', line 291 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.
290 291 292 |
# File 'lib/goodguide/gibbon.rb', line 290 def client @client end |
Class Method Details
.default ⇒ Object
280 281 282 |
# File 'lib/goodguide/gibbon.rb', line 280 def self.default @default ||= new end |
Instance Method Details
#gibbon ⇒ Object
304 305 306 |
# File 'lib/goodguide/gibbon.rb', line 304 def gibbon self[:Gibbon] end |