class Beaver::Owner20
Owner structure to be used in any resource where an application is the owner
Attributes
id[RW]
TODO: Write general description for this method @return [String]
path[RW]
TODO: Write general description for this method @return [String]
resource[RW]
TODO: Write general description for this method @return [String]
Public Class Methods
from_hash(hash)
click to toggle source
Creates an instance of the object from a hash.
# File lib/beaver/models/owner20.rb, line 39 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. id = hash['id'] resource = hash['resource'] path = hash['path'] # Create object from extracted values. Owner20.new(id, resource, path) end
names()
click to toggle source
A mapping from model property names to API property names.
# File lib/beaver/models/owner20.rb, line 22 def self.names @_hash = {} if @_hash.nil? @_hash['id'] = 'id' @_hash['path'] = 'path' @_hash['resource'] = 'resource' @_hash end
new(id = nil, resource = nil, path = nil)
click to toggle source
# File lib/beaver/models/owner20.rb, line 30 def initialize(id = nil, resource = nil, path = nil) @id = id @path = path @resource = resource end