Class: GetOrgData
- Inherits:
-
Object
- Object
- GetOrgData
- Defined in:
- lib/get_org_data.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#image ⇒ Object
Returns the value of attribute image.
-
#name ⇒ Object
Returns the value of attribute name.
-
#parent_id ⇒ Object
Returns the value of attribute parent_id.
-
#title ⇒ Object
Returns the value of attribute title.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id
2 3 4 |
# File 'lib/get_org_data.rb', line 2 def id @id end |
#image ⇒ Object
Returns the value of attribute image
2 3 4 |
# File 'lib/get_org_data.rb', line 2 def image @image end |
#name ⇒ Object
Returns the value of attribute name
2 3 4 |
# File 'lib/get_org_data.rb', line 2 def name @name end |
#parent_id ⇒ Object
Returns the value of attribute parent_id
2 3 4 |
# File 'lib/get_org_data.rb', line 2 def parent_id @parent_id end |
#title ⇒ Object
Returns the value of attribute title
2 3 4 |
# File 'lib/get_org_data.rb', line 2 def title @title end |
Class Method Details
.to_end ⇒ Object
17 18 19 20 21 |
# File 'lib/get_org_data.rb', line 17 def self.to_end table_end = "" table_end << "</table>" table_end.html_safe end |
.to_start ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/get_org_data.rb', line 4 def self.to_start table_start = "" table_start << "<table id='orgChartData' style='display: none;'>" table_start<< "<tr>" table_start<< "<th>id</th>" table_start<<"<th>parent id</th>" table_start<<"<th>name</th>" table_start<<"<th>title</th>" table_start<<"<th>image</th>" table_start<<"</tr>" table_start.html_safe end |
Instance Method Details
#to_node ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/get_org_data.rb', line 23 def to_node node = "" node << "<tr>" node << "<td>#{id}</td>" node << "<td>#{parent_id}</td>" node << "<td>#{name}</td>" node << "<td>#{title}</td>" node << "<td>#{image}</td>" node << "</tr>" node.html_safe end |