Class: Overlord
- Inherits:
-
Object
- Object
- Overlord
- Defined in:
- lib/stack_overlord.rb
Instance Attribute Summary collapse
-
#error ⇒ Object
readonly
Returns the value of attribute error.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(collected_error) ⇒ Overlord
constructor
A new instance of Overlord.
- #mash ⇒ Object
- #post_message ⇒ Object
- #puts_link ⇒ Object
- #run ⇒ Object
Constructor Details
#initialize(collected_error) ⇒ Overlord
Returns a new instance of Overlord.
18 19 20 |
# File 'lib/stack_overlord.rb', line 18 def initialize(collected_error) @error = {message: collected_error., error_class: collected_error.class} end |
Instance Attribute Details
#error ⇒ Object (readonly)
Returns the value of attribute error.
16 17 18 |
# File 'lib/stack_overlord.rb', line 16 def error @error end |
Class Method Details
.make_overlord ⇒ Object
22 23 24 25 |
# File 'lib/stack_overlord.rb', line 22 def self.make_overlord @stack_master = Overlord.new($!) @stack_master.run end |
Instance Method Details
#mash ⇒ Object
27 28 29 |
# File 'lib/stack_overlord.rb', line 27 def mash Mac.addr.encrypt end |
#post_message ⇒ Object
31 32 33 |
# File 'lib/stack_overlord.rb', line 31 def RestClient.post "http://www.stackoverlord.com/#{mash}", @error.to_json, :content_type => :json, :accept => :json end |
#puts_link ⇒ Object
35 36 37 |
# File 'lib/stack_overlord.rb', line 35 def puts_link puts "\e[31m Your Overlord resides here: http://www.stackoverlord.com/#{mash} \e[0m" end |
#run ⇒ Object
39 40 41 42 |
# File 'lib/stack_overlord.rb', line 39 def run self. self.puts_link end |