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

Window   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
c 1
b 0
f 0
dl 0
loc 22
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A width() 0 3 1
A singleton() 0 3 1
A height() 0 3 1
A location() 0 3 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