AI
Size: a a a
AI
AI
BO
BO
СБ
E
class Human < ApplicationRecord
enum status: {alive: 0, dead: 1}
aasm column: :status, enum: true do
state :alive, :dead
event :dead do
transitions from: :alive, to: :dead
after do
puts "cry when people die"
end
end
end
end
human = Human.last
human.alive?
# => true
human.status = :dead
human.save
cry when people die
” ?BO
СБ
require 'spreadsheet'
book = Spreadsheet.open 'main.xls'
sheet = book.worksheet 0
puts sheet.rows[0][0] # => тест
puts sheet.rows[1][0] # => 42.0
puts sheet.rows[2][0] # => 042
СБ
СБ
СБ
СБ
BO
AI
СБ
BO
СБ
042
.BO
СБ
2.5.1 :010 > sheet.rows[2][0]
=> "042"
2.5.1 :011 > sheet.rows[2][0].class
=> String
СБ