Class: Kuhsaft::Partition

Inherits:
Object
  • Object
show all
Defined in:
app/models/kuhsaft/partition.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, id) ⇒ Partition

Returns a new instance of Partition.



5
6
7
8
# File 'app/models/kuhsaft/partition.rb', line 5

def initialize(name, id)
  @name = name
  @id = id
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



3
4
5
# File 'app/models/kuhsaft/partition.rb', line 3

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'app/models/kuhsaft/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/kuhsaft/partition.rb', line 10

def self.style_for_index(style, idx)
  [
    ['span4', 'span8'],
    ['span6', 'span6'],
    ['span8', 'span4']
  ][style][idx]
end