Class: TRMNLPreview::App

Inherits:
Sinatra::Base
  • Object
show all
Defined in:
lib/trmnl_preview/app.rb

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ App

Returns a new instance of App.



13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/trmnl_preview/app.rb', line 13

def initialize(*args)
  super

  begin
    @context = Context.new(settings.user_dir)
  rescue StandardError => e
    puts e.message
    exit 1
  end

  @context.poll_data if @context.strategy == 'polling'
end