Class: RQRCode::Export::HTML::Cell

Inherits:
Struct
  • Object
show all
Defined in:
lib/rqrcode/export/html.rb

Instance Method Summary collapse

Instance Method Details

#as_htmlObject



37
38
39
# File 'lib/rqrcode/export/html.rb', line 37

def as_html
  "<td class=\"#{html_class}\"></td>"
end

#dark?Boolean

Returns:

  • (Boolean)


45
46
47
# File 'lib/rqrcode/export/html.rb', line 45

def dark?
  qr.dark?(row_index, col_index)
end

#html_classObject



41
42
43
# File 'lib/rqrcode/export/html.rb', line 41

def html_class
  dark? ? 'black' : 'white'
end