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.
263 264 265 266 267 268 269 270 271 272 273 274 |
# File 'lib/goodguide/gibbon.rb', line 263 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.
262 263 264 |
# File 'lib/goodguide/gibbon.rb', line 262 def client @client end |
Class Method Details
.default ⇒ Object
252 253 254 |
# File 'lib/goodguide/gibbon.rb', line 252 def self.default @default ||= new end |
Instance Method Details
#gibbon ⇒ Object
276 277 278 |
# File 'lib/goodguide/gibbon.rb', line 276 def gibbon self[:Gibbon] end |