Class: FastExt::Tab

Inherits:
Object
  • Object
show all
Defined in:
lib/fast_ext/tab.rb

Class Attribute Summary collapse

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, opts = {}) ⇒ Tab

:opts => {members:[{:member => :title, :title => ‘标题’ },:note,:m_tabs]}



17
18
19
20
21
22
23
# File 'lib/fast_ext/tab.rb', line 17

def initialize(name,opts = {})
  self.name = name
  opts.each_pair do |k,v|
    self.send "#{k}=", v
  end
  self.class.tabs[name.to_s] = self
end

Class Attribute Details

.tabsObject

Returns the value of attribute tabs.



8
9
10
# File 'lib/fast_ext/tab.rb', line 8

def tabs
  @tabs
end

Instance Attribute Details

#entityObject

Returns the value of attribute entity.



14
15
16
# File 'lib/fast_ext/tab.rb', line 14

def entity
  @entity
end

#form_kindObject

Returns the value of attribute form_kind.



14
15
16
# File 'lib/fast_ext/tab.rb', line 14

def form_kind
  @form_kind
end

#grid_kindObject

Returns the value of attribute grid_kind.



14
15
16
# File 'lib/fast_ext/tab.rb', line 14

def grid_kind
  @grid_kind
end

#included_tabObject

Returns the value of attribute included_tab.



14
15
16
# File 'lib/fast_ext/tab.rb', line 14

def included_tab
  @included_tab
end

#membersObject

Returns the value of attribute members.



14
15
16
# File 'lib/fast_ext/tab.rb', line 14

def members
  @members
end

#nameObject

Returns the value of attribute name.



14
15
16
# File 'lib/fast_ext/tab.rb', line 14

def name
  @name
end

#readonlyObject

Returns the value of attribute readonly.



14
15
16
# File 'lib/fast_ext/tab.rb', line 14

def readonly
  @readonly
end

#titleObject

Returns the value of attribute title.



14
15
16
# File 'lib/fast_ext/tab.rb', line 14

def title
  @title
end

Class Method Details

.find(name) ⇒ Object



9
10
11
# File 'lib/fast_ext/tab.rb', line 9

def find(name)
  @tabs[name.to_s]
end