Completed
Push — master ( e348e7...94d493 )
by Yoh
57s
created

Window.width()   A

Complexity

Conditions 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
1
module Hyalite::DOM
2
  class Window
3
    include Native
4
    include EventTarget
5
6
    native_reader :document
7
8
    def location
9
      Native(`#@native.location`)
10
    end
11
12
    def width
13
      `#@native.innerWidth`
14
    end
15
16
    def height
17
      `#@native.innerHeight`
18
    end
19
20
    def self.singleton
21
      @singleton ||= self.new(`window`)
22
    end
23
  end
24
end
25