LINUX.ORG.RU

Это такой хеллоупис?

dogbert ★★★★★
()
Ответ на: комментарий от cetjs

Оригинальная это хотя бы так:

#!/usr/bin/env ruby
$KCODE = 'u'

class Logoped
  attr_accessor :target
  attr_reader :tasks

  class Task
    def initialize
      @actions = []
      self
    end
    def add(action, wrong, right)
      puts "Action \"#{action}\" (#{wrong} -> #{right}) queued."
      @actions.push([action, wrong, right])
      self
    end
  end

  def initialize(type)
    @type = type
    @tasks = Task.new
    self
  end

  def to_s
    "Logoped of #{@type} type."
  end

  def summon
    puts "Logoped of #{@type} type summoned. Target is #{@target}!"
    self
  end
end

mylogo = Logoped.new("strict")
mylogo.target = "cetjs"
mylogo.tasks.add("replace", "1вая", "1-ая")
mylogo.summon

Deleted
()

я исключаю тебя из ордена, недостойный.

volh ★★
()

>Получить файлы от Анонимного пользователя

так вот он где, а мы заждались

Levinskij
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.