class AllTheFavicons::Tiles

Public Class Methods

all() click to toggle source
# File lib/all_the_favicons/tiles.rb, line 4
def all
  files(/^mstile/).map { |f| ms_icon(f) }
end
tile_image() click to toggle source
# File lib/all_the_favicons/tiles.rb, line 8
def tile_image
  files(/^mstile-/).first
end
tile_image?() click to toggle source
# File lib/all_the_favicons/tiles.rb, line 12
def tile_image?
  tile_image ? true : false
end

Private Class Methods

default_size() click to toggle source
# File lib/all_the_favicons/tiles.rb, line 18
def default_size
  Vector2d.new(150, 150)
end
ms_icon(f) click to toggle source
# File lib/all_the_favicons/tiles.rb, line 22
def ms_icon(f)
  icon(f).merge(name: tile_name(f))
end
square?(v) click to toggle source
# File lib/all_the_favicons/tiles.rb, line 26
def square?(v)
  v.x == v.y
end
tile_name(f) click to toggle source
# File lib/all_the_favicons/tiles.rb, line 30
def tile_name(f)
  (square?(dimensions(f)) ? "square" : "wide") +
    dimensions(f).to_s +
    "logo"
end