Class: Refinery::Whatson::Tab
- Inherits:
-
Object
- Object
- Refinery::Whatson::Tab
- Defined in:
- lib/refinery/whatson/tabs.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#partial ⇒ Object
Returns the value of attribute partial.
Class Method Summary collapse
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
10 11 12 |
# File 'lib/refinery/whatson/tabs.rb', line 10 def name @name end |
#partial ⇒ Object
Returns the value of attribute partial.
10 11 12 |
# File 'lib/refinery/whatson/tabs.rb', line 10 def partial @partial end |
Class Method Details
.register {|tab| ... } ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/refinery/whatson/tabs.rb', line 12 def self.register(&block) tab = self.new yield tab raise "A tab MUST have a name!: #{tab.inspect}" if tab.name.blank? raise "A tab MUST have a partial!: #{tab.inspect}" if tab.partial.blank? end |