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.



85
86
87
88
89
90
91
92
93
94
95
# File 'lib/actionjabber.rb', line 85

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.



82
83
84
# File 'lib/actionjabber.rb', line 82

def args
  @args
end

#formatObject (readonly)

Returns the value of attribute format.



82
83
84
# File 'lib/actionjabber.rb', line 82

def format
  @format
end

#fromObject (readonly)

Returns the value of attribute from.



82
83
84
# File 'lib/actionjabber.rb', line 82

def from
  @from
end

#hashObject (readonly)

Returns the value of attribute hash.



82
83
84
# File 'lib/actionjabber.rb', line 82

def hash
  @hash
end

#pathObject (readonly)

Returns the value of attribute path.



82
83
84
# File 'lib/actionjabber.rb', line 82

def path
  @path
end