summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorrautenberg <rautenberg@in-silico.ch>2016-08-25 13:38:20 +0200
committerrautenberg <rautenberg@in-silico.ch>2016-08-25 13:38:20 +0200
commitcaecd7bba7082f4d2558c8fbc0d1409c4f401694 (patch)
tree6a3253c770484498e3ba2fca582ae2e89cb37dac /lib
parenta66380cac80ea01dc37a67c77fcffddf62607f52 (diff)
version to 0.0.3
Diffstat (limited to 'lib')
-rw-r--r--lib/qmrf-report.rb4
-rw-r--r--lib/qprf-report.rb6
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/qmrf-report.rb b/lib/qmrf-report.rb
index 6391a0d..3ec1fdd 100644
--- a/lib/qmrf-report.rb
+++ b/lib/qmrf-report.rb
@@ -10,7 +10,7 @@ module OpenTox
#@example Report
# require "qsar-report"
# report = OpenTox::QMRFReport.new
- # report.Value "QSAR_title", "My QSAR Title"
+ # report.value "QSAR_title", "My QSAR Title"
# report.change_catalog :publications_catalog, :publications_catalog_1, {:title => "MyName M (2016) My Publication Title, QSAR News, 10, 14-22", :url => "http://myqsarnewsmag.dom"}
# report.ref_catalog :bibliography, :publications_catalog, :publications_catalog_1
# puts report.to_xml
@@ -48,7 +48,7 @@ module OpenTox
# @param [String] value Value to change. If not set the function returns the current value
# @return [Error] returns Error message if fails
# @return [String] returns value
- def Value key, value=nil
+ def value key, value=nil
raise "Can not edit attribute #{key} directly. Edit the catalog with 'report.change_catalog(catalog, key, value)'." if ["QSAR_software","QSAR_Algorithm", ""].include? key
t = @report.at_css key
t.content = value unless value.nil?
diff --git a/lib/qprf-report.rb b/lib/qprf-report.rb
index c87e12b..0ab5813 100644
--- a/lib/qprf-report.rb
+++ b/lib/qprf-report.rb
@@ -14,7 +14,7 @@ module OpenTox
# report.Title = "My QPRF Report"
# report.Version = "1"
# report.Date = Time.now.strftime("%Y/%m/%d")
- # report.Value "1.1", "7732-18-5" # set CAS number for H²O
+ # report.value "1.1", "7732-18-5" # set CAS number for H²O
# puts report.to_html
class QPRFReport
@@ -56,12 +56,12 @@ module OpenTox
# Set or Get a value in the QPRF report
#@example for CAS Number
# report = OpenTox::QPRFReport.new
- # report.Value "1.1", "7732-18-5"
+ # report.value "1.1", "7732-18-5"
#
# @param [String] chapter Name of the chapter - e.g.: "1.1", "1.2", "1.3", "1.4", "1.5 General", "1.5 a.", "1.5 b.", "1.5 c.", "1.5 d.", "2.1" ...
# @param [String] value Value to set. If not set the function returns the current value
# @return [String] returns Value
- def Value chapter, value=nil
+ def value chapter, value=nil
case chapter
when /^1\.\d*/
block = "1. Substance"