Class: UnderOs::App

Inherits:
Object
  • Object
show all
Defined in:
lib/under_os/app.rb

Class Method Summary collapse

Class Method Details

.configObject



18
19
20
# File 'lib/under_os/app.rb', line 18

def config
  @config ||= UnderOs::Config.new(self)
end

.historyObject



22
23
24
# File 'lib/under_os/app.rb', line 22

def history
  @history
end

.setup(ios_app, options) ⇒ Object



8
9
10
11
12
13
14
15
16
# File 'lib/under_os/app.rb', line 8

def setup(ios_app, options)
  @history = UnderOs::History.new

  instance_exec self, &@start_block

  @window = UIWindow.alloc.initWithFrame(UIScreen.mainScreen.bounds)
  @window.rootViewController = @history._
  @window.makeKeyAndVisible
end

.start(&block) ⇒ Object



4
5
6
# File 'lib/under_os/app.rb', line 4

def start(&block)
  @start_block = block
end

.stylesheetObject



26
27
28
29
30
31
# File 'lib/under_os/app.rb', line 26

def stylesheet
  @stylesheet ||= UnderOs::Page::Stylesheet.new.tap do |stylesheet|
    stylesheet.load('under-os.css')
    stylesheet.load('application.css')
  end
end