Class: Fastui::View

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/fastui/view.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeView

Returns a new instance of View.



8
9
10
11
12
# File 'lib/fastui/view.rb', line 8

def initialize
  @project = 'Fastui Rapid Development Framework'
  @version = 'version 0.1.0 built on ExtJS 4.2.0'
  @copyright = 'Copyright 2007-2013 ChunTeng Co., Ltd.'
end

Instance Attribute Details

Returns the value of attribute copyright.



6
7
8
# File 'lib/fastui/view.rb', line 6

def copyright
  @copyright
end

#projectObject

Returns the value of attribute project.



6
7
8
# File 'lib/fastui/view.rb', line 6

def project
  @project
end

#versionObject

Returns the value of attribute version.



6
7
8
# File 'lib/fastui/view.rb', line 6

def version
  @version
end

Instance Method Details

#config(&block) ⇒ Object



23
24
25
# File 'lib/fastui/view.rb', line 23

def config(&block)
  block.call(self) if block_given?
end

#find_window(name) ⇒ Object



27
28
29
# File 'lib/fastui/view.rb', line 27

def find_window(name)
  Fastui::Window.find(name) || {}
end

#tab(name, tab) ⇒ Object



19
20
21
# File 'lib/fastui/view.rb', line 19

def tab(name, tab)
  Fastui::Tab.new(name, tab)
end

#win(name, opts = {}, &block) ⇒ Object



15
16
17
# File 'lib/fastui/view.rb', line 15

def win(name, opts = {}, &block)
  Fastui::Window.new(name, opts, &block)
end