Class: Habaki::Visitor::Media

Inherits:
Object
  • Object
show all
Defined in:
lib/habaki/visitor/media.rb

Overview

media query visitor

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type = "all", width = nil, height = nil) ⇒ Media

Returns a new instance of Media.



15
16
17
18
19
# File 'lib/habaki/visitor/media.rb', line 15

def initialize(type = "all", width = nil, height = nil)
  @type = type
  @width = width
  @height = height
end

Instance Attribute Details

#heightInteger

height, in pixels

Returns:

  • (Integer)


13
14
15
# File 'lib/habaki/visitor/media.rb', line 13

def height
  @height
end

#typeString

eg “print”, “screen”

Returns:



7
8
9
# File 'lib/habaki/visitor/media.rb', line 7

def type
  @type
end

#widthInteger

width, in pixels

Returns:

  • (Integer)


10
11
12
# File 'lib/habaki/visitor/media.rb', line 10

def width
  @width
end