class Wsapi::Object
Attributes
raw_data[R]
Public Class Methods
from_data(type, raw_data)
click to toggle source
# File lib/wsapi/models/object.rb, line 25 def self.from_data(type, raw_data) if type && Wsapi.const_defined?(type) Wsapi.const_get(type).new(raw_data) else Object.new(raw_data) end end
new(raw_data)
click to toggle source
# File lib/wsapi/models/object.rb, line 5 def initialize(raw_data) @raw_data = raw_data end
Public Instance Methods
id()
click to toggle source
# File lib/wsapi/models/object.rb, line 13 def id @raw_data['ObjectID'] end
name()
click to toggle source
# File lib/wsapi/models/object.rb, line 9 def name @raw_data['_refObjectName'] end
url()
click to toggle source
# File lib/wsapi/models/object.rb, line 17 def url @raw_data['_ref'] end
workspace()
click to toggle source
# File lib/wsapi/models/object.rb, line 21 def workspace @raw_data["Workspace"]["_refObjectName"] end