class DataKitten::Agent
A person or organisation.
Naming is based on {xmlns.com/foaf/spec/#term_Agent foaf:Agent}, but with useful aliases for other vocabularies.
Attributes
email[RW]
@!attribute mbox
@return [String] the email address of the Agent
homepage[RW]
@!attribute homepage
@return [String] the homepage URL of the Agent
mbox[RW]
@!attribute mbox
@return [String] the email address of the Agent
name[RW]
@!attribute name
@return [String] the name of the Agent
uri[RW]
@!attribute homepage
@return [String] the homepage URL of the Agent
url[RW]
@!attribute homepage
@return [String] the homepage URL of the Agent
Public Class Methods
new(options)
click to toggle source
Create a new Agent
@param [Hash] options the details of the Agent
. @option options [String] :name The Agent's name @option options [String] :homepage The homepage URL for the Agent
@option options [String] :mbox Email address for the Agent
# File lib/data_kitten/agent.rb, line 15 def initialize(options) @name = options[:name] @homepage = options[:homepage] @mbox = options[:mbox] end
Public Instance Methods
==(agent)
click to toggle source
# File lib/data_kitten/agent.rb, line 36 def ==(agent) agent.is_a?(Agent) && ([name, homepage, mbox] == [agent.name, agent.homepage, agent.mbox]) end