Class: Eve::Layout
- Inherits:
-
Object
- Object
- Eve::Layout
- Defined in:
- lib/eve/layout.rb
Instance Attribute Summary collapse
-
#columns ⇒ Object
Returns the value of attribute columns.
Instance Method Summary collapse
- #add_column(input) ⇒ Object
-
#initialize ⇒ Layout
constructor
A new instance of Layout.
Constructor Details
#initialize ⇒ Layout
Returns a new instance of Layout.
7 8 9 |
# File 'lib/eve/layout.rb', line 7 def initialize @columns = [] end |
Instance Attribute Details
#columns ⇒ Object
Returns the value of attribute columns.
5 6 7 |
# File 'lib/eve/layout.rb', line 5 def columns @columns end |
Instance Method Details
#add_column(input) ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/eve/layout.rb', line 11 def add_column(input) return nil if input.nil? parts = input.split(";") return nil if parts.size != 3 entry = { :column_type => parts[0].downcase.to_sym, :filter => parts[1], :order => parts[2].to_i } @columns << entry entry end |