Class: RobustExcelOle::REOCommon
- Inherits:
-
Object
- Object
- RobustExcelOle::REOCommon
show all
- Defined in:
- lib/robust_excel_ole/reo_common.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.puts_hash(hash) ⇒ Object
126
127
128
129
130
131
132
133
134
135
136
137
|
# File 'lib/robust_excel_ole/reo_common.rb', line 126
def self.puts_hash(hash)
hash.each do |e|
if e[1].is_a?(Hash)
puts "#{e[0]} =>"
e[1].each do |f|
puts " #{f[0]} => #{f[1]}"
end
else
puts "#{e[0]} => #{e[1]}"
end
end
end
|
.tr1(_text) ⇒ Object
105
106
107
|
# File 'lib/robust_excel_ole/reo_common.rb', line 105
def self.tr1(_text)
puts :text
end
|
.trace(text) ⇒ Object
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
|
# File 'lib/robust_excel_ole/reo_common.rb', line 109
def self.trace(text)
if LOG_TO_STDOUT
puts text
else
if REO_LOG_DIR.empty?
homes = ['HOME', 'HOMEPATH']
home = homes.find { |h| !ENV[h].nil? }
reo_log_dir = ENV[home]
else
reo_log_dir = REO_LOG_DIR
end
File.open(reo_log_dir + '/' + REO_LOG_FILE,'a') do |file|
file.puts text
end
end
end
|
Instance Method Details
#excel ⇒ Object
97
98
99
|
# File 'lib/robust_excel_ole/reo_common.rb', line 97
def excel
raise TypeREOError, 'receiver instance is neither an Excel nor a Workbook'
end
|
#own_methods ⇒ Object
101
102
103
|
# File 'lib/robust_excel_ole/reo_common.rb', line 101
def own_methods
(self.methods - Object.methods).sort
end
|