Class: DearInventory::Models::Request

Inherits:
DearInventory::Model show all
Extended by:
T::Sig
Defined in:
lib/dear_inventory/models/request.rb

Direct Known Subclasses

TestRequest

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DearInventory::Model

define_readers, enumerate_fields, fields, #initialize_abstract, #to_h

Methods included from IsASubclass

#is_a?

Constructor Details

#initialize(parameters) ⇒ Request

Returns a new instance of Request.



19
20
21
22
23
24
# File 'lib/dear_inventory/models/request.rb', line 19

def initialize(parameters)
  @action = T.let(parameters[:action], Symbol)
  @model = T.let(parameters[:model], T.class_of(DearInventory::Model))
  @params = T.let(parameters[:params], DearInventory::Parameters)
  @uri = T.let(parameters[:uri], String)
end

Instance Attribute Details

#actionObject (readonly)

Returns the value of attribute action.



10
11
12
# File 'lib/dear_inventory/models/request.rb', line 10

def action
  @action
end

#modelObject (readonly)

Returns the value of attribute model.



12
13
14
# File 'lib/dear_inventory/models/request.rb', line 12

def model
  @model
end

#paramsObject (readonly)

Returns the value of attribute params.



14
15
16
# File 'lib/dear_inventory/models/request.rb', line 14

def params
  @params
end

#uriObject (readonly)

Returns the value of attribute uri.



16
17
18
# File 'lib/dear_inventory/models/request.rb', line 16

def uri
  @uri
end