object-view 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,16 @@
1
+ require 'object_view/page.rb'
2
+ require 'object_view/element.rb'
3
+ require 'object_view/body'
4
+ require 'object_view/head'
5
+ require 'object_view/header'
6
+ require 'object_view/javascript_file'
7
+ require 'object_view/div'
8
+ require 'object_view/span'
9
+ require 'object_view/javascript'
10
+ require 'object_view/table'
11
+ require "object_view/link"
12
+ require "object_view/chart_data"
13
+
14
+
15
+ module ObjectView
16
+ end
@@ -0,0 +1,12 @@
1
+ require_relative './element'
2
+ module ObjectView
3
+
4
+ class Body < Element
5
+ def initialize
6
+ puts "Creating body"
7
+ super
8
+ @tag = "body"
9
+ end
10
+
11
+ end
12
+ end
@@ -0,0 +1,22 @@
1
+ @@chart_id = 0
2
+
3
+
4
+ module ObjectView
5
+ # ajax_method_for_params specifies a javascript method that will be called by ajax update script to retrieve non-static params
6
+ # This method needs to be added to page and returns a string in the form : "a=b&c=d&e=f"
7
+ class ChartData
8
+ attr_accessor :id, :series, :label, :chart_type, :x_axis_label, :y_axis_labels, :ajax_url, :ajax_params, :ajax_refresh_seconds, :ajax_method_for_params
9
+
10
+ def initialize(type)
11
+ @@chart_id += 1
12
+ @ajax_method_for_params = nil
13
+ @ajax_params = Hash.new
14
+ @id = "chart_#{@@chart_id}"
15
+ @chart_type = type
16
+ @series = []
17
+ @x_axis_label = "Time"
18
+ @y_axis_labels = ["Count"]
19
+ end
20
+
21
+ end
22
+ end
@@ -0,0 +1,127 @@
1
+ require_relative "./page"
2
+
3
+ module ObjectView
4
+ class ChartLoadJavascript < ObjectView::Javascript
5
+
6
+ def initialize(chart_load_js_content)
7
+ super()
8
+ add "
9
+ // Chart Partial erb: <%= Time.new.to_s%>
10
+
11
+ function drawChart() {
12
+ #{chart_data_load_script(chart_load_js_content)}
13
+ }
14
+
15
+ function initializeChart() {
16
+ google.load('visualization', '1', {packages:['corechart']});
17
+ google.setOnLoadCallback(drawChart);
18
+ }
19
+ initializeChart();
20
+ "
21
+ end
22
+
23
+ def chart_data_load_script(chart_load_js_content)
24
+ script = ""
25
+ chart_load_js_content.each do |chart_data|
26
+ chart_object = "Error"
27
+ if (chart_data.chart_type == :line)
28
+ chart_object = "LineChart"
29
+ elsif(chart_data.chart_type == :pie)
30
+ chart_object = "PieChart"
31
+ elsif(chart_data.chart_type == :stacked_area)
32
+ chart_object = "AreaChart"
33
+ elsif(chart_data.chart_type == :area)
34
+ chart_object = "AreaChart"
35
+ elsif(chart_data.chart_type == :stepped_area)
36
+ chart_object = "SteppedAreaChart"
37
+ else
38
+ raise ("chart_data needs a valid 'chart_type': :line or :pie")
39
+ end
40
+
41
+ # Rails.logger.info "Chart data y-axis (as js render): #{chart_data.y_axis_labels}"
42
+ y_axis_elements = ""
43
+ chart_data.y_axis_labels.each do |label|
44
+ y_axis_elements += "'#{label}'"
45
+ if (chart_data.y_axis_labels.last != label)
46
+ y_axis_elements += ", "
47
+ end
48
+ end
49
+
50
+ # script += "// #{chart_data.series}\n"
51
+ script += "var chartArray = ([ \n"
52
+ script += "['#{chart_data.x_axis_label}', #{y_axis_elements}], \n"
53
+ show_legend = false
54
+ chart_data.series.each do |data|
55
+ script += " "
56
+ script += "["
57
+ if (data.length > 2)
58
+ show_legend = true
59
+ end
60
+
61
+ (0..data.length - 1).each do |i|
62
+ data_item = data[i]
63
+ if (i == 0)
64
+ script += "'#{data_item}'"
65
+ else
66
+ script += "#{data_item}"
67
+ end
68
+ if (i != data.length - 1)
69
+ script += ", "
70
+ end
71
+ end
72
+ script += "]"
73
+ if (chart_data.series.last != data)
74
+ script += ","
75
+ script += "\n"
76
+ end
77
+ end
78
+ script += " ]);\n"
79
+ script += " var chartData = google.visualization.arrayToDataTable(chartArray); \n"
80
+ script += " var chart = new google.visualization.#{chart_object}(document.getElementById('#{chart_data.id}'));\n"
81
+ if (chart_data.chart_type == :pie)
82
+ script += "
83
+ var options = {
84
+ title: '#{chart_data.label}'
85
+ }
86
+ "
87
+ else
88
+ if (show_legend)
89
+ legend_value = ""
90
+ else
91
+ legend_value = "legend: 'none',"
92
+ end
93
+
94
+
95
+ if(chart_data.chart_type == :stacked_area)
96
+
97
+ script += "
98
+ var options = {
99
+ vAxis: {minValue: 0},
100
+ isStacked: true,
101
+ title: '#{chart_data.label}',
102
+ displayAnnotations: true,
103
+ curveType: 'function',
104
+ fontSize: 10
105
+ }
106
+ "
107
+ else
108
+ script += "
109
+ var options = {
110
+ title: '#{chart_data.label}',
111
+ #{legend_value}
112
+ displayAnnotations: true,
113
+ curveType: 'function',
114
+ fontSize: 10
115
+ }
116
+ "
117
+ end
118
+ end
119
+ script += " chart.draw(chartData, options);\n"
120
+
121
+ end
122
+ return script
123
+ end
124
+ end
125
+
126
+
127
+ end
@@ -0,0 +1,204 @@
1
+ require_relative "./page"
2
+ require 'uri'
3
+
4
+
5
+ module ObjectView
6
+ class ChartLoadJavascriptAjax < ObjectView::Javascript
7
+
8
+ def initialize(chart_load_js_content, ajax_refresh_seconds = nil, prepend_script = "")
9
+ super()
10
+
11
+
12
+
13
+ script = "
14
+ #{prepend_script}
15
+
16
+ var _nextTimeToDraw = jQuery.now() + 1000;
17
+ var _doingPeriodicCheck = false;
18
+
19
+ function periodicCheck() {
20
+ if (_initializedCharts) {
21
+ if (!_doingPeriodicCheck) {
22
+ _doingPeriodicCheck = true;
23
+ var now = jQuery.now();
24
+ if (_nextTimeToDraw != null) {
25
+ if (now > _nextTimeToDraw) {
26
+ _doingPeriodicCheck = false;
27
+ if (_currentlyDrawing == false) {
28
+ _nextTimeToDraw = null;
29
+ drawChart();
30
+ } else {
31
+ }
32
+ }
33
+ }
34
+ _doingPeriodicCheck = false;
35
+ }
36
+ } else {
37
+ console.log('Waiting for google charts to initialize');
38
+ initializeChart();
39
+ }
40
+ }
41
+
42
+
43
+ var _chartRequestMade = false;
44
+ function makeChartDrawRequest(time) {
45
+ var nextTime = jQuery.now() + time;
46
+ if ((_nextTimeToDraw == null) || (nextTime < _nextTimeToDraw)) {
47
+ _nextTimeToDraw = nextTime;
48
+ }
49
+ console.log('Request to drawChart queued for: ' + _nextTimeToDraw);
50
+ }
51
+
52
+ function clearCharts() {
53
+ #{clear_script_for_each_chart(chart_load_js_content)}
54
+ }
55
+
56
+
57
+ _currentlyDrawing = false;
58
+ function drawChart() {
59
+ console.log('drawChart called');
60
+ try {
61
+ _currentlyDrawing = true;
62
+ console.log('Drawing charts.');
63
+ //alert('drawChart()');
64
+ #{chart_data_load_script(chart_load_js_content)}
65
+ console.log('Finished drawing charts.');
66
+ "
67
+ if (ajax_refresh_seconds != nil)
68
+ script += "
69
+ console.log('finished drawing chart. Queuing another drawChart request.');
70
+
71
+ makeChartDrawRequest(#{ajax_refresh_seconds * 1000});\n
72
+ _currentlyDrawing = false;
73
+ "
74
+ end
75
+
76
+ script += "
77
+ } catch(error) {
78
+ console.log('Exception drawing chart: ' + error);
79
+ _currentlyDrawing = false;
80
+ makeChartDrawRequest(1000);
81
+ }
82
+ _currentlyDrawing = false;
83
+ }
84
+ "
85
+ chart_load_js_content.each do |chart_data|
86
+ script += " $('##{chart_data.id}').html('<h2 style=\"color: #aaaaaa\">Building Chart...</h2>'); \n"
87
+ end
88
+
89
+ script += " initializeChart();\n;"
90
+ script += " setInterval(periodicCheck, 500);\n"
91
+ if (ajax_refresh_seconds != nil)
92
+ script += " makeChartDrawRequest(1000); \n"
93
+ else
94
+ script += "makeChartDrawRequest(1000);\n"
95
+ end
96
+ add script
97
+ end
98
+
99
+
100
+ def clear_script_for_each_chart(chart_load_js_content)
101
+ script = ""
102
+ chart_load_js_content.each do |chart_data|
103
+ chart_data.id
104
+ script += " $('##{chart_data.id}').html('<h3 style=\"color: #aaaaaa\">Building Chart</h3>');\n"
105
+ end
106
+ return script
107
+ end
108
+
109
+
110
+ def chart_data_load_script(chart_load_js_content)
111
+ script = ""
112
+ chart_load_js_content.each do |chart_data|
113
+ params = []
114
+
115
+ chart_data.ajax_params.each do |name, value|
116
+ # params_string += "#{name}=#{value}&"
117
+ params << [name, value]
118
+ end
119
+ # if (params_string.length > 0)
120
+ # params_string = params_string[0..params_string.length - 2]
121
+ # end
122
+ params_string = URI.encode_www_form(params)
123
+
124
+
125
+ chart_object = "Error"
126
+ additional_options_script = ""
127
+ if (chart_data.chart_type == :line)
128
+ chart_object = "LineChart"
129
+ elsif(chart_data.chart_type == :pie)
130
+ chart_object = "PieChart"
131
+ elsif(chart_data.chart_type == :stacked_area)
132
+ chart_object = "AreaChart"
133
+ additional_options_script = " options['isStacked'] = true;\n"
134
+ elsif(chart_data.chart_type == :area)
135
+ chart_object = "AreaChart"
136
+ elsif(chart_data.chart_type == :stepped_area)
137
+ chart_object = "SteppedAreaChart"
138
+ else
139
+ raise ("chart_data needs a valid 'chart_type': :line or :pie")
140
+ end
141
+
142
+ if (params_string.length > 0)
143
+ script += " var params = '#{params_string}';\n"
144
+ if (chart_data.ajax_method_for_params != nil)
145
+ script += " params = params + '&' + #{chart_data.ajax_method_for_params};\n"
146
+ end
147
+ else
148
+ if (chart_data.ajax_method_for_params != nil)
149
+ script += " var params = #{chart_data.ajax_method_for_params};\n"
150
+ else
151
+ script += " var params = '';\n"
152
+ end
153
+ end
154
+
155
+ script += "
156
+ $.ajax({
157
+ type: 'POST',
158
+ url: '#{chart_data.ajax_url}',
159
+ data: params,
160
+ dataType: 'text',
161
+ success: function(response) {
162
+ //alert(\"Response: \" + response);
163
+ var chartData = jQuery.parseJSON(response);
164
+
165
+ //alert('Json: ' + chartData);
166
+ var seriesJson = chartData.series;
167
+
168
+ var options = chartData.options;
169
+ #{additional_options_script}
170
+ //alert('Options: ' + options);
171
+
172
+ var series = [];
173
+ for (var i = 0; i < seriesJson.length; i++) {
174
+ var dataPointJson = seriesJson[i];
175
+ var dataPoint = [];
176
+ dataPoint.push(dataPointJson[0].toString());
177
+ for (var j = 1; j < dataPointJson.length; j++) {
178
+ dataPoint.push(dataPointJson[j]);
179
+ }
180
+ series.push(dataPoint);
181
+ }
182
+
183
+ // var number = 5
184
+ // var series = [ ['Time', 'Count'], [number.toString(), 0], ['04/30/2013', 0], ['05/28/2013', 0], ['06/25/2013', 0] ];
185
+ var chartElementId = '#{chart_data.id}';
186
+ //alert('Series: ' + series);
187
+ var chartData = google.visualization.arrayToDataTable(series);
188
+ var chart = new google.visualization.#{chart_object}(document.getElementById(chartElementId));
189
+
190
+ chart.draw(chartData, options);
191
+ },
192
+ error: function(XMLHttpRequest, textStatus, errorThrown) {
193
+ $('##{chart_data.id}').html('<h3>Error getting chart data - QA server may be down.</h3>');
194
+ }
195
+ });
196
+ "
197
+ end
198
+ return script
199
+ end
200
+
201
+ end
202
+
203
+
204
+ end
@@ -0,0 +1,16 @@
1
+ require_relative './span'
2
+
3
+
4
+ module ObjectView
5
+
6
+ class Div < Element
7
+
8
+ def initialize(content = nil)
9
+ super()
10
+ @tag = "div"
11
+ if (content != nil)
12
+ self.add content
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,153 @@
1
+ require_relative './object_view_error'
2
+
3
+ module ObjectView
4
+
5
+ class Element
6
+ attr_accessor :tag, :attributes, :single_line, :acceptable_children
7
+ attr_reader :children
8
+
9
+ def initialize
10
+ @tab = " "
11
+ @single_line = false
12
+ @tag = nil
13
+ @attributes = Hash.new
14
+ @children = []
15
+ @acceptable_children = [String, Element]
16
+ end
17
+
18
+
19
+ def find_element_with_tag(tag)
20
+ found = []
21
+ @children.each do |child|
22
+ if (child.is_a?(Element)) && (child.tag == tag)
23
+ found << child
24
+ end
25
+ end
26
+ if (found.length == 0)
27
+ return nil
28
+ elsif (found.length == 1)
29
+ return found[0]
30
+ else
31
+ return found
32
+ end
33
+
34
+ end
35
+
36
+ def attr(name, value)
37
+ @attributes[name] = value
38
+ end
39
+
40
+ def on_click=(value)
41
+ self.attr("onclick", value)
42
+ end
43
+
44
+ def style=(the_style)
45
+ self.attr("style", the_style)
46
+ end
47
+
48
+ def css_class=(value)
49
+ self.attr("class", value)
50
+ end
51
+
52
+ def id=(value)
53
+ self.attr("id", value)
54
+ end
55
+
56
+ def is_acceptable_child?(child)
57
+ @acceptable_children.each do |good_class|
58
+ if (child.is_a?(good_class))
59
+ return true
60
+ end
61
+ end
62
+ return false
63
+ end
64
+
65
+ def add(element_or_string)
66
+ if (self.is_acceptable_child?(element_or_string))
67
+ @children << element_or_string
68
+ elsif (element_or_string.is_a?(Array))
69
+ element_or_string.each do |child|
70
+ add child
71
+ end
72
+ else
73
+ raise "Parent: #{self.tag} - Attempt to add an element that is not a valid child, and not an ObjectView::Element. Class of element: #{element_or_string.class.name}: #{element_or_string}\nTag of parent: #{self.tag}.\nAcceptable children: #{@acceptable_children.join(',')}"
74
+ end
75
+
76
+ return element_or_string
77
+ end
78
+
79
+ def add_with_tag(tag, content = nil)
80
+ element = Element.new
81
+ element.tag = tag
82
+ if (content != nil)
83
+ element.children << content
84
+ end
85
+ element.single_line = false
86
+ self.children << element
87
+ return element
88
+ end
89
+
90
+ def <<(item)
91
+ self.children << item
92
+ end
93
+
94
+ def render_children(indent = 0)
95
+ html = StringIO.new
96
+ @children.each do |child|
97
+ if (indent != nil)
98
+ if (!self.single_line)
99
+ html << "\n"
100
+ end
101
+ html << @tab * indent
102
+ end
103
+ if (child.class.name == "String")
104
+ html << child
105
+ else
106
+ child_html = child.render(indent)
107
+ html << child_html
108
+ end
109
+ end
110
+ return html.string
111
+ end
112
+
113
+ def render_attributes
114
+ html = StringIO.new
115
+ if (@attributes.length > 0)
116
+ @attributes.each do |name, value|
117
+ html << " #{name}=\"#{value}\""
118
+ end
119
+ end
120
+ return html.string
121
+ end
122
+
123
+ def render(indent = 0)
124
+ #Rails.logger.debug "Rendering: #{self} Tag: #{self.tag}"
125
+ html = StringIO.new
126
+ if (indent != nil)
127
+ html << (@tab * indent)
128
+ end
129
+ html << "<#{tag}#{render_attributes}>"
130
+ if (self.single_line)
131
+ html << "#{render_children(nil)}"
132
+ else
133
+ if (indent == nil)
134
+ html << render_children(indent)
135
+ else
136
+ html << render_children(indent + 1)
137
+ end
138
+ end
139
+
140
+
141
+ if (!self.single_line)
142
+ html << "\n"
143
+ if (indent != nil)
144
+ html << @tab * indent
145
+ end
146
+ end
147
+
148
+ html << "</#{tag}>\n"
149
+ return html.string
150
+ end
151
+
152
+ end
153
+ end
@@ -0,0 +1,11 @@
1
+ require_relative './element'
2
+ module ObjectView
3
+
4
+ class Head < Element
5
+ def initialize
6
+ super
7
+ @tag = "head"
8
+ end
9
+
10
+ end
11
+ end
@@ -0,0 +1,14 @@
1
+ require_relative './element'
2
+
3
+ module ObjectView
4
+
5
+ class Header < Element
6
+ def initialize(n, text)
7
+ super()
8
+ @single_line = true
9
+ @tag = "h#{n}"
10
+ add text
11
+ end
12
+
13
+ end
14
+ end
@@ -0,0 +1,15 @@
1
+ require_relative './element'
2
+
3
+ module ObjectView
4
+ class Javascript < Element
5
+
6
+ def initialize(content = nil)
7
+ super()
8
+ attr("type", "text/javascript")
9
+ @tag = "script"
10
+ if (content != nil)
11
+ add content
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,17 @@
1
+ require_relative './element'
2
+
3
+ module ObjectView
4
+
5
+ class JavascriptFile < Element
6
+
7
+ def initialize(file)
8
+ super()
9
+ self.single_line = true
10
+ attr("type", "text/javascript")
11
+ attr("src", file)
12
+ @tag = "script"
13
+ end
14
+
15
+
16
+ end
17
+ end
@@ -0,0 +1,18 @@
1
+ module ObjectView
2
+
3
+ class Link < Element
4
+
5
+ def initialize(href = nil, label = nil)
6
+ super()
7
+ @tag = "a"
8
+
9
+ if (href != nil)
10
+ self.attr("href", href)
11
+ end
12
+
13
+ if (label != nil)
14
+ self.add label
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,9 @@
1
+ class ObjectViewError < StandardError
2
+ attr_reader :original
3
+
4
+ def initialize(msg, original=nil);
5
+ super(msg);
6
+ @original = original;
7
+ end
8
+
9
+ end
@@ -0,0 +1,59 @@
1
+ require_relative './element'
2
+ require_relative './body'
3
+ require_relative './head'
4
+ require_relative './header'
5
+ require_relative './javascript_file'
6
+ require_relative './div'
7
+ require_relative './span'
8
+ require_relative './javascript'
9
+ require_relative './table'
10
+ require_relative "./link"
11
+ require_relative "./chart_data"
12
+ require_relative "./chart_load_javascript"
13
+ require_relative "./chart_load_javascript_ajax"
14
+
15
+
16
+
17
+ module ObjectView
18
+ class Page < Element
19
+ attr_accessor :head, :body, :title, :title_div, :top_div
20
+
21
+ def initialize
22
+ super
23
+ puts "Element tag: #{@tag}"
24
+ self.tag = "html"
25
+ @head = Head.new
26
+ @title = "No Title"
27
+ self.add @head
28
+ @body = Body.new
29
+ self.add @body
30
+ @top_div = self.body.add Div.new
31
+ @title_div = self.body.add Div.new
32
+ @title = "No Title"
33
+ @acceptable_children = [Head, Body]
34
+ end
35
+
36
+ def displayed_title=(title)
37
+ self.title_div.add(Header.new(1, title))
38
+ end
39
+
40
+ def title=(title)
41
+ title_element = @head.find_element_with_tag("title")
42
+ if (title_element == nil)
43
+ title_element = @head.add_with_tag("title", title)
44
+ end
45
+ title_element.add(title)
46
+ end
47
+
48
+ def use_google_charts(chart_load_js_content)
49
+ self.head.add JavascriptFile.new("https://www.google.com/jsapi")
50
+ self.body.add ChartLoadJavascript.new(chart_load_js_content)
51
+ end
52
+
53
+ def use_google_charts_ajax(chart_load_js_content, refresh_seconds = nil, prepend_js_script = "")
54
+ self.head.add JavascriptFile.new("https://www.google.com/jsapi")
55
+ self.body.add ChartLoadJavascriptAjax.new(chart_load_js_content, refresh_seconds, prepend_js_script)
56
+ end
57
+
58
+ end
59
+ end
@@ -0,0 +1,13 @@
1
+ module ObjectView
2
+
3
+ class Span < Element
4
+
5
+ def initialize(content = nil)
6
+ super()
7
+ @tag = "span"
8
+ if (content != nil)
9
+ self.add content
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,122 @@
1
+ module ObjectView
2
+
3
+ class Table < Element
4
+ attr_reader :tbody, :thead
5
+
6
+ def initialize
7
+ super()
8
+ @tag = "table"
9
+ end
10
+
11
+ def header_row(labels = nil)
12
+ self.add @thead = THead.new
13
+ row = THeadRow.new
14
+ @thead.add row
15
+ if (labels != nil)
16
+ labels.each do |label|
17
+ row.cell(label)
18
+ end
19
+ end
20
+ return row
21
+ end
22
+
23
+ def row(cell_data = nil, cell_attributes = nil)
24
+ if (@tbody == nil)
25
+ self.add @tbody = TBody.new
26
+ end
27
+ row = @tbody.row
28
+ if (cell_data != nil)
29
+ cell_data.each do |element|
30
+ cell = row.cell(element)
31
+ if (cell_attributes != nil)
32
+ cell_attributes.each do |name, value|
33
+ cell.attr(name.to_s, value)
34
+ end
35
+ end
36
+ end
37
+ end
38
+ return row
39
+ end
40
+ end
41
+
42
+ class THead < Element
43
+ def initialize
44
+ super()
45
+ self.single_line = true
46
+ @tag = "thead"
47
+ end
48
+
49
+ def row
50
+ @row = THeadRow.new
51
+ self.add(@row)
52
+ return @row
53
+ end
54
+
55
+ end
56
+
57
+ class TBody < Element
58
+ def initialize
59
+ super()
60
+ @tag = "tbody"
61
+ end
62
+
63
+ def row
64
+ @row = TRow.new
65
+ self.add(@row)
66
+ return @row
67
+ end
68
+ end
69
+
70
+
71
+
72
+ class TRow < Element
73
+ def initialize
74
+ super()
75
+ @tag = "tr"
76
+ end
77
+
78
+ def cell(content = nil)
79
+ cell = TCell.new
80
+ if (content != nil)
81
+ cell.add content
82
+ end
83
+ self.add cell
84
+ return cell
85
+ end
86
+ end
87
+
88
+ class THeadRow < TRow
89
+ def initialize
90
+ super()
91
+ @tag = "tr"
92
+ end
93
+
94
+ def cell(content = nil)
95
+ cell = THeadCell.new
96
+ if (content != nil)
97
+ cell.add content
98
+ end
99
+ self.add cell
100
+ return cell
101
+ end
102
+ end
103
+
104
+
105
+ class TCell < Element
106
+ def initialize
107
+ super()
108
+ self.single_line = true
109
+ @tag = "td"
110
+ end
111
+ end
112
+
113
+
114
+ class THeadCell < TCell
115
+ def initialize
116
+ super()
117
+ self.single_line = true
118
+ @tag = "th"
119
+ end
120
+ end
121
+
122
+ end
metadata ADDED
@@ -0,0 +1,63 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: object-view
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.4.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Mike Moore
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2014-03-10 00:00:00.000000000 Z
13
+ dependencies: []
14
+ description: Object oriented approach to generating HTML content
15
+ email: m.moore.denver@gmail.com
16
+ executables: []
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - lib/object_view/body.rb
21
+ - lib/object_view/chart_data.rb
22
+ - lib/object_view/chart_load_javascript.rb
23
+ - lib/object_view/chart_load_javascript_ajax.rb
24
+ - lib/object_view/div.rb
25
+ - lib/object_view/element.rb
26
+ - lib/object_view/head.rb
27
+ - lib/object_view/header.rb
28
+ - lib/object_view/javascript.rb
29
+ - lib/object_view/javascript_file.rb
30
+ - lib/object_view/link.rb
31
+ - lib/object_view/object_view_error.rb
32
+ - lib/object_view/page.rb
33
+ - lib/object_view/span.rb
34
+ - lib/object_view/table.rb
35
+ - lib/object_view.rb
36
+ homepage: https://github.com/mikejmoore/object-view
37
+ licenses:
38
+ - MIT
39
+ post_install_message:
40
+ rdoc_options: []
41
+ require_paths:
42
+ - lib
43
+ - lib/object_view
44
+ required_ruby_version: !ruby/object:Gem::Requirement
45
+ none: false
46
+ requirements:
47
+ - - ! '>='
48
+ - !ruby/object:Gem::Version
49
+ version: '0'
50
+ required_rubygems_version: !ruby/object:Gem::Requirement
51
+ none: false
52
+ requirements:
53
+ - - ! '>='
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
56
+ requirements: []
57
+ rubyforge_project:
58
+ rubygems_version: 1.8.23
59
+ signing_key:
60
+ specification_version: 3
61
+ summary: Object oriented views
62
+ test_files: []
63
+ has_rdoc: