Class: Typekit::Connection::Request
- Inherits:
-
Object
- Object
- Typekit::Connection::Request
- Extended by:
- Forwardable
- Defined in:
- lib/typekit/connection/request.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
Returns the value of attribute action.
-
#node ⇒ Object
readonly
Returns the value of attribute node.
-
#parameters ⇒ Object
readonly
Returns the value of attribute parameters.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
- #address ⇒ Object
-
#initialize(action:, parameters: {}) ⇒ Request
constructor
A new instance of Request.
- #sign(node) ⇒ Object
Constructor Details
#initialize(action:, parameters: {}) ⇒ Request
Returns a new instance of Request.
11 12 13 14 15 |
# File 'lib/typekit/connection/request.rb', line 11 def initialize(action:, parameters: {}) @action = action @parameters = parameters @path = [] end |
Instance Attribute Details
#action ⇒ Object (readonly)
Returns the value of attribute action.
8 9 10 |
# File 'lib/typekit/connection/request.rb', line 8 def action @action end |
#node ⇒ Object (readonly)
Returns the value of attribute node.
8 9 10 |
# File 'lib/typekit/connection/request.rb', line 8 def node @node end |
#parameters ⇒ Object (readonly)
Returns the value of attribute parameters.
8 9 10 |
# File 'lib/typekit/connection/request.rb', line 8 def parameters @parameters end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
8 9 10 |
# File 'lib/typekit/connection/request.rb', line 8 def path @path end |
Instance Method Details
#address ⇒ Object
17 18 19 |
# File 'lib/typekit/connection/request.rb', line 17 def address @path.map(&:to_s).join('/') end |
#sign(node) ⇒ Object
21 22 23 |
# File 'lib/typekit/connection/request.rb', line 21 def sign(node) @node = node end |