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
117
118
119
120
121
122
123
124
125
126
127
128
|
# File 'lib/robust_excel_ole/reo_common.rb', line 117
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
96
97
98
|
# File 'lib/robust_excel_ole/reo_common.rb', line 96
def self.tr1(text)
puts :text
end
|
.trace(text) ⇒ Object
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
|
# File 'lib/robust_excel_ole/reo_common.rb', line 100
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
88
89
90
|
# File 'lib/robust_excel_ole/reo_common.rb', line 88
def excel
raise TypeREOError, "receiver instance is neither an Excel nor a Book"
end
|
#own_methods ⇒ Object
92
93
94
|
# File 'lib/robust_excel_ole/reo_common.rb', line 92
def own_methods
(self.methods - Object.methods).sort
end
|