class Rsbe::Client::Se

Public Class Methods

all() click to toggle source
# File lib/rsbe/client/se.rb, line 6
def self.all
  emsg = 'Method not supported. Access via Rsbe::Client::Partner#collections'
  fail Rsbe::Client::MethodNotImplementedError, emsg
end
all_attrs() click to toggle source
# File lib/rsbe/client/se.rb, line 49
def self.all_attrs
  self.rw_attrs + self.ro_attrs
end
base_path() click to toggle source
Calls superclass method Rsbe::Client::Base::base_path
# File lib/rsbe/client/se.rb, line 11
def self.base_path
  super + '/ses'
end
new(vals = {}) click to toggle source
Calls superclass method Rsbe::Client::Base::new
# File lib/rsbe/client/se.rb, line 86
def initialize(vals = {})
  raise ArgumentError.new("Constructor requires a Hash") unless vals.is_a?(Hash)
  super()
  @hash = {}
  @response = nil

  # initialize local hash with incoming values, restrict to RW attrs
  self.class.rw_attrs.each { |x| @hash[x] = (vals[x] || vals[x.to_s]) }
end
ro_attrs() click to toggle source
# File lib/rsbe/client/se.rb, line 45
def self.ro_attrs
  [:created_at, :updated_at, :lock_version]
end
rw_attrs() click to toggle source

implementation objectives:

  • expose attributes via standard setter/getter methods

  • create getters for all Read-Only (RO) attributes

  • create setters only for Read/Write (RW) attributes

  • use hash for internal representation to simplify passing data back and forth to back end app

# File lib/rsbe/client/se.rb, line 41
def self.rw_attrs
  [:id, :coll_id, :digi_id, :do_type, :phase, :step, :status, :label, :notes]
end

Private Class Methods

search_required_keys() click to toggle source
# File lib/rsbe/client/se.rb, line 24
def self.search_required_keys
  []
end
search_scope() click to toggle source
# File lib/rsbe/client/se.rb, line 28
def self.search_scope
  "ses"
end