Class: FastExt::View

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/fast_ext/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/fast_ext/view.rb', line 8

def initialize
  @project = 'FastExt Rapid Development Framework'
  @version = "version #{FastExt::VERSION} built on ExtJS 4.2.1"
  @copyright = 'Copyright 2013-2014 [email protected].'
end

Instance Attribute Details

Returns the value of attribute copyright.



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

def copyright
  @copyright
end

#projectObject

Returns the value of attribute project.



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

def project
  @project
end

#versionObject

Returns the value of attribute version.



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

def version
  @version
end

Instance Method Details

#config(&block) ⇒ Object



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

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

#find_window(name) ⇒ Object



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

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

#tab(name, tab) ⇒ Object



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

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

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



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

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