Class: UU::OS::GVC::TableRow
- Inherits:
-
Object
- Object
- UU::OS::GVC::TableRow
- Defined in:
- uu_os_gvc-0.28.16/lib/uu/os/gvc/table_row.rb
Overview
Table row class, it is used as return type in some Table methods.
Instance Attribute Summary (collapse)
-
- (String) code
readonly
Table row code.
-
- (Boolean) visible
Flag if row is visible in form.
Instance Method Summary (collapse)
-
- (TableRow) initialize(data = nil)
constructor
Creates new instance of TableRow.
-
- (String) to_json(options = {})
Returns attributes representation as JSON String.
-
- (String) to_s
Returns attributes representation as JSON String.
Constructor Details
- (TableRow) initialize(data = nil)
Creates new instance of TableRow.
41 42 43 44 45 46 47 48 |
# File 'uu_os_gvc-0.28.16/lib/uu/os/gvc/table_row.rb', line 41 def initialize(data = nil) if data.kind_of?Hash @attributes = data elsif data.kind_of?String @attributes = JSON.parse(data, :symbolize_names => true) end end |
Instance Attribute Details
- (String) code (readonly)
Table row code. Read only.
36 37 38 |
# File 'uu_os_gvc-0.28.16/lib/uu/os/gvc/table_row.rb', line 36 def code @code end |
- (Boolean) visible
Flag if row is visible in form. Default is true. If is set to false row is completely hidden.
23 24 25 |
# File 'uu_os_gvc-0.28.16/lib/uu/os/gvc/table_row.rb', line 23 def visible @visible end |
Instance Method Details
- (String) to_json(options = {})
Returns attributes representation as JSON String.
53 54 55 |
# File 'uu_os_gvc-0.28.16/lib/uu/os/gvc/table_row.rb', line 53 def to_json( = {}) attributes.to_json() end |
- (String) to_s
Returns attributes representation as JSON String.
60 61 62 |
# File 'uu_os_gvc-0.28.16/lib/uu/os/gvc/table_row.rb', line 60 def to_s to_json end |