Class: Entrance::Agent::Restful

Inherits:
Object
  • Object
show all
Includes:
Fake::Hash
Defined in:
lib/entrance/agent/restful.rb

Direct Known Subclasses

Certificate, Entrance, Service

Defined Under Namespace

Classes: GatewayTimeout, Invalid, Unavailable

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ Restful

Returns a new instance of Restful.



17
18
19
20
21
22
23
# File 'lib/entrance/agent/restful.rb', line 17

def initialize params={}
  if self.class.included_modules.include? ::Entrance::Globalizer
    self.class.current = self
  end
  @id = params[:id]
  read if params[:load] and id
end

Instance Attribute Details

#idObject

Returns the value of attribute id.



15
16
17
# File 'lib/entrance/agent/restful.rb', line 15

def id
  @id
end

Instance Method Details

#to_restObject

Raises:

  • (NotImplementedError)


27
28
29
# File 'lib/entrance/agent/restful.rb', line 27

def to_rest
  raise NotImplementedError
end