class Dynamicloud::API::RecordImpl
This class represents a record in Dynamicloud
@author Eleazar Gomez @version 1.0.0 @since 8/24/15
Public Class Methods
new()
click to toggle source
# File lib/dynamic_api.rb, line 243 def initialize @map = {} end
Public Instance Methods
add_value(attribute, value)
click to toggle source
Adds a new value paired with attribute @param attribute attribute to be paired @param value value
# File lib/dynamic_api.rb, line 278 def add_value(attribute, value) @map[attribute] = value end
get_value(attribute)
click to toggle source
gets the value paired with attribute @param attribute attribute to use @return the value paired with attribute
# File lib/dynamic_api.rb, line 250 def get_value(attribute) obj = @map[attribute] if obj if obj.is_a?(String) return obj.to_s end end raise IllegalStateException, "The attribute #{attribute} doesn't have a paired string." end
get_values(attribute)
click to toggle source
get the values paired with attribute @param attribute attribute to use @return the values paired with attribute
# File lib/dynamic_api.rb, line 264 def get_values(attribute) obj = @map[attribute] if obj if obj.respond_to?(:each) return obj end end raise IllegalStateException, "Tha attribute #{attribute} doesn't have a paired string array." end