Class: DomReactorRedGlass::ChainReaction
- Inherits:
-
Object
- Object
- DomReactorRedGlass::ChainReaction
- Defined in:
- lib/domreactor-redglass/chain_reaction.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#info ⇒ Object
readonly
Returns the value of attribute info.
Instance Method Summary collapse
- #auth_token ⇒ Object
- #chain_reaction_url ⇒ Object
-
#initialize(opts) ⇒ ChainReaction
constructor
A new instance of ChainReaction.
- #post_archives(archive_location) ⇒ Object
- #resource_url ⇒ Object
Constructor Details
#initialize(opts) ⇒ ChainReaction
Returns a new instance of ChainReaction.
8 9 10 11 |
# File 'lib/domreactor-redglass/chain_reaction.rb', line 8 def initialize(opts) @opts = opts @info = info end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
6 7 8 |
# File 'lib/domreactor-redglass/chain_reaction.rb', line 6 def id @id end |
#info ⇒ Object (readonly)
Returns the value of attribute info.
6 7 8 |
# File 'lib/domreactor-redglass/chain_reaction.rb', line 6 def info @info end |
Instance Method Details
#auth_token ⇒ Object
13 14 15 |
# File 'lib/domreactor-redglass/chain_reaction.rb', line 13 def auth_token Config.auth_token end |
#chain_reaction_url ⇒ Object
21 22 23 |
# File 'lib/domreactor-redglass/chain_reaction.rb', line 21 def chain_reaction_url "#{resource_url}/#{id}" end |
#post_archives(archive_location) ⇒ Object
34 35 36 37 38 39 40 |
# File 'lib/domreactor-redglass/chain_reaction.rb', line 34 def post_archives(archive_location) archive_location.archives.each do |archive| payload = create_payload(archive) create_dom_gun_reaction(payload) end start_reaction end |