Class: Shoes::Mock::App

Inherits:
Object
  • Object
show all
Defined in:
shoes-core/lib/shoes/mock/app.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(dsl) ⇒ App

Returns a new instance of App.



7
8
9
10
# File 'shoes-core/lib/shoes/mock/app.rb', line 7

def initialize(dsl)
  @dsl = dsl
  @started = false
end

Instance Attribute Details

#fullscreenObject

Returns the value of attribute fullscreen.



6
7
8
# File 'shoes-core/lib/shoes/mock/app.rb', line 6

def fullscreen
  @fullscreen
end

Instance Method Details

#click(_blk) ⇒ Object



58
59
# File 'shoes-core/lib/shoes/mock/app.rb', line 58

def click(_blk)
end

#clipboardObject



45
46
# File 'shoes-core/lib/shoes/mock/app.rb', line 45

def clipboard
end

#clipboard=(_text) ⇒ Object



48
49
# File 'shoes-core/lib/shoes/mock/app.rb', line 48

def clipboard=(_text)
end

#flushObject



42
43
# File 'shoes-core/lib/shoes/mock/app.rb', line 42

def flush
end

#focusObject



31
32
33
# File 'shoes-core/lib/shoes/mock/app.rb', line 31

def focus
  true
end

#gutterObject



51
52
53
# File 'shoes-core/lib/shoes/mock/app.rb', line 51

def gutter
  16
end

#heightObject



18
19
20
# File 'shoes-core/lib/shoes/mock/app.rb', line 18

def height
  @dsl.opts[:height]
end

#openObject



22
23
24
25
# File 'shoes-core/lib/shoes/mock/app.rb', line 22

def open
  @started = true
  self.fullscreen = true if @dsl.start_as_fullscreen?
end

#open?Boolean

Returns:

  • (Boolean)


27
28
29
# File 'shoes-core/lib/shoes/mock/app.rb', line 27

def open?
  true
end

#quitObject



35
36
# File 'shoes-core/lib/shoes/mock/app.rb', line 35

def quit
end

#release(_blk) ⇒ Object



61
62
# File 'shoes-core/lib/shoes/mock/app.rb', line 61

def release(_blk)
end

#started?Boolean

Returns:

  • (Boolean)


38
39
40
# File 'shoes-core/lib/shoes/mock/app.rb', line 38

def started?
  @started
end

#wait_until_closedObject



55
56
# File 'shoes-core/lib/shoes/mock/app.rb', line 55

def wait_until_closed
end

#widthObject

suboptimal but good enough for now… calling the DSL lets the methods play ping pong calling each other… will think of something.



14
15
16
# File 'shoes-core/lib/shoes/mock/app.rb', line 14

def width
  @dsl.opts[:width]
end