Class: DearInventory::Models::Request
- Inherits:
-
DearInventory::Model
- Object
- DearInventory::Model
- DearInventory::Models::Request
- Extended by:
- T::Sig
- Defined in:
- lib/dear_inventory/models/request.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
Returns the value of attribute action.
-
#model ⇒ Object
readonly
Returns the value of attribute model.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#uri ⇒ Object
readonly
Returns the value of attribute uri.
Instance Method Summary collapse
-
#initialize(parameters) ⇒ Request
constructor
A new instance of Request.
Methods inherited from DearInventory::Model
define_readers, enumerate_fields, fields, #initialize_abstract, #to_h
Methods included from IsASubclass
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
#action ⇒ Object (readonly)
Returns the value of attribute action.
10 11 12 |
# File 'lib/dear_inventory/models/request.rb', line 10 def action @action end |
#model ⇒ Object (readonly)
Returns the value of attribute model.
12 13 14 |
# File 'lib/dear_inventory/models/request.rb', line 12 def model @model end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
14 15 16 |
# File 'lib/dear_inventory/models/request.rb', line 14 def params @params end |
#uri ⇒ Object (readonly)
Returns the value of attribute uri.
16 17 18 |
# File 'lib/dear_inventory/models/request.rb', line 16 def uri @uri end |