class SakaiInfo::ToolProperty
Public Class Methods
find_by_tool_id(tool_id)
click to toggle source
# File lib/sakai-info/tool.rb, line 111 def self.find_by_tool_id(tool_id) properties = {} DB.connect[:sakai_site_tool_property]. where(:tool_id => tool_id).all.each do |row| properties[row[:name]] = row[:value].read end return properties end
get(tool_id, property_name)
click to toggle source
# File lib/sakai-info/tool.rb, line 101 def self.get(tool_id, property_name) row = DB.connect[:sakai_site_tool_property]. filter(:tool_id => tool_id, :name => property_name).first if row.nil? nil else row[:value].read end end