Class: Infreemation::Request
- Inherits:
-
Object
- Object
- Infreemation::Request
- Defined in:
- lib/infreemation/request.rb
Overview
This class represents a FOI or EIR request
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes = {}) {|_self| ... } ⇒ Request
constructor
A new instance of Request.
- #save! ⇒ Object
Constructor Details
#initialize(attributes = {}) {|_self| ... } ⇒ Request
Returns a new instance of Request.
26 27 28 29 |
# File 'lib/infreemation/request.rb', line 26 def initialize(attributes = {}) @attributes = attributes yield self if block_given? end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
24 25 26 |
# File 'lib/infreemation/request.rb', line 24 def attributes @attributes end |
Class Method Details
.create!(attributes = {}) ⇒ Object
13 14 15 |
# File 'lib/infreemation/request.rb', line 13 def create!(attributes = {}) new(attributes, &:save!) end |
.path ⇒ Object
9 10 11 |
# File 'lib/infreemation/request.rb', line 9 def path '/foi/' end |