class UptrendsExtended::Checkpoint
Public Class Methods
new(client, response, attributes = {})
click to toggle source
# File lib/uptrends_extended/checkpoint.rb, line 6 def initialize(client, response, attributes = {}) @attributes = attributes gen_and_set_accessors end
Private Instance Methods
api_url()
click to toggle source
# File lib/uptrends_extended/checkpoint.rb, line 16 def api_url '/checkpointservers' end
gen_and_set_accessors()
click to toggle source
# File lib/uptrends_extended/checkpoint.rb, line 20 def gen_and_set_accessors attributes = [] self.attributes.each_pair do |k,v| k = k.to_s.underscore # setup attr_reader for all attributes and set it's value. self.class.send(:attr_reader, k) self.instance_variable_set("@#{k}", v) attributes << k.to_sym end @attributes = attributes end