Class: Qbrick::Partition
- Inherits:
-
Object
- Object
- Qbrick::Partition
- Defined in:
- app/models/qbrick/partition.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name, id) ⇒ Partition
constructor
A new instance of Partition.
Constructor Details
#initialize(name, id) ⇒ Partition
Returns a new instance of Partition.
5 6 7 8 |
# File 'app/models/qbrick/partition.rb', line 5 def initialize(name, id) @name = name @id = id end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
3 4 5 |
# File 'app/models/qbrick/partition.rb', line 3 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'app/models/qbrick/partition.rb', line 3 def name @name end |
Class Method Details
.style_for_index(style, idx) ⇒ Object
10 11 12 13 14 15 16 |
# File 'app/models/qbrick/partition.rb', line 10 def self.style_for_index(style, idx) [ %w(span8 span4), %w(span6 span6), %w(span4 span8) ][style][idx] end |