Method: Frameit::Screenshot#initialize

Defined in:
lib/frameit/screenshot.rb

#initialize(path, color) ⇒ Screenshot

path: Path to screenshot color: Color to use for the frame



11
12
13
14
15
16
17
18
# File 'lib/frameit/screenshot.rb', line 11

def initialize(path, color)
  UI.user_error "Couldn't find file at path '#{path}'" unless File.exist? path
  @color = color
  @path = path
  @size = FastImage.size(path)

  @screen_size = ENV["FRAMEIT_FORCE_DEVICE_TYPE"] || Deliver::AppScreenshot.calculate_screen_size(path)
end