Class: ActionJabber::Server::Request

Inherits:
Object
  • Object
show all
Defined in:
lib/actionjabber.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash, from, path, args) ⇒ Request

Sets up the request object.



89
90
91
92
93
94
95
96
97
98
99
# File 'lib/actionjabber.rb', line 89

def initialize(hash, from, path, args)
  @hash = hash
  @from = from
  @path = path
  begin
    @format = path.match(/\.([A-z]+)$/).to_a[1].to_sym
  rescue
    @format = nil
  end
  @args = args
end

Instance Attribute Details

#argsObject (readonly)

Returns the value of attribute args.



86
87
88
# File 'lib/actionjabber.rb', line 86

def args
  @args
end

#formatObject (readonly)

Returns the value of attribute format.



86
87
88
# File 'lib/actionjabber.rb', line 86

def format
  @format
end

#fromObject (readonly)

Returns the value of attribute from.



86
87
88
# File 'lib/actionjabber.rb', line 86

def from
  @from
end

#hashObject (readonly)

Returns the value of attribute hash.



86
87
88
# File 'lib/actionjabber.rb', line 86

def hash
  @hash
end

#pathObject (readonly)

Returns the value of attribute path.



86
87
88
# File 'lib/actionjabber.rb', line 86

def path
  @path
end