Class: TrackedNetwork
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- TrackedNetwork
- Defined in:
- lib/skynet-core/db/ibrands.rb
Instance Method Summary collapse
- #mining_is_not_ok! ⇒ Object
- #mining_is_ok! ⇒ Object
- #passive? ⇒ Boolean
- #processing! ⇒ Object
- #processing? ⇒ Boolean
- #sieves ⇒ Object
Instance Method Details
#mining_is_not_ok! ⇒ Object
63 64 65 66 |
# File 'lib/skynet-core/db/ibrands.rb', line 63 def mining_is_not_ok! self.state = 'registred' if self.state == 'in_processing' self.save end |
#mining_is_ok! ⇒ Object
54 55 56 57 |
# File 'lib/skynet-core/db/ibrands.rb', line 54 def mining_is_ok! self.state = 'passive' if self.state == 'in_processing' self.save end |
#passive? ⇒ Boolean
59 60 61 |
# File 'lib/skynet-core/db/ibrands.rb', line 59 def passive? self.state == 'passive' end |
#processing! ⇒ Object
45 46 47 48 |
# File 'lib/skynet-core/db/ibrands.rb', line 45 def processing! self.state = 'in_processing' if self.state == 'passive' self.save end |
#processing? ⇒ Boolean
50 51 52 |
# File 'lib/skynet-core/db/ibrands.rb', line 50 def processing? self.state == 'in_processing' end |
#sieves ⇒ Object
68 69 70 |
# File 'lib/skynet-core/db/ibrands.rb', line 68 def sieves @sieves ||= Sieve.by_brand self.brand_id end |