Class: Sharepoint::Soap::Authenticate

Inherits:
Object
  • Object
show all
Defined in:
lib/sharepoint-session.rb

Constant Summary collapse

SOURCE =
"soap/authenticate.xml.erb"

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ Authenticate

Returns a new instance of Authenticate.



21
22
23
24
25
26
# File 'lib/sharepoint-session.rb', line 21

def initialize params = {}
  Authenticate.initialize
  @username  = params[:username]
  @password  = params[:password]
  @login_url = params[:url]
end

Instance Attribute Details

#login_urlObject

Returns the value of attribute login_url.



11
12
13
# File 'lib/sharepoint-session.rb', line 11

def 
  @login_url
end

#passwordObject

Returns the value of attribute password.



11
12
13
# File 'lib/sharepoint-session.rb', line 11

def password
  @password
end

#usernameObject

Returns the value of attribute username.



11
12
13
# File 'lib/sharepoint-session.rb', line 11

def username
  @username
end

Class Method Details

.initializeObject



13
14
15
16
17
18
19
# File 'lib/sharepoint-session.rb', line 13

def self.initialize
  return if @initialized == true
  @erb          = ERB.new(::File.read ::File.dirname(__FILE__) + '/' + SOURCE)
  @erb.filename = SOURCE
  @erb.def_method self, 'render()'
  @initialized  = true
end