Class: FamiliarUrl

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/skynet-core/db/ibrands.rb

Instance Method Summary collapse

Instance Method Details

#mining_is_not_ok!Object



137
138
139
140
# File 'lib/skynet-core/db/ibrands.rb', line 137

def mining_is_not_ok!
  self.state = 'registred' if self.state == 'in_processing'
  self.save
end

#mining_is_ok!Object



128
129
130
131
# File 'lib/skynet-core/db/ibrands.rb', line 128

def mining_is_ok!
  self.state = 'passive' if self.state == 'in_processing'
  self.save
end

#passive?Boolean

Returns:

  • (Boolean)


133
134
135
# File 'lib/skynet-core/db/ibrands.rb', line 133

def passive?
  self.state == 'passive'
end

#processing!Object



119
120
121
122
# File 'lib/skynet-core/db/ibrands.rb', line 119

def processing!
  self.state = 'in_processing' if self.state == 'passive'
  self.save
end

#processing?Boolean

Returns:

  • (Boolean)


124
125
126
# File 'lib/skynet-core/db/ibrands.rb', line 124

def processing?
  self.state == 'in_processing'
end