Evgenii Legotckoi
June 29, 2016, 12:51 p.m.

RubyUser Guide #18 - Ruby - procedure objects

procedure objects, Ruby, ruby lesson, ruby уроки, user guide, процедурные объекты, руководство пользователя

It is often desirable to be able to specify responses to unexpected events. As it turns out, this is most easily done if we can pass blocks of code as arguments to other methods, which means we want to be …

Read
Evgenii Legotckoi
June 28, 2016, 12:49 p.m.

RubyUser Guide #17 - Ruby - modules

modules, Ruby, ruby lesson, ruby уроки, user guide, модули, руководство пользователя

Modules in ruby are similar to classes, except:

  • A module can have no instances.
  • A module can have no subclasses.
  • A module is defined by module ... end

Actually... the Module class of module is the superclass of the Class …

Read
Evgenii Legotckoi
June 27, 2016, 12:47 p.m.

RubyUser Guide #16 - Ruby - Singleton methods

method, Ruby, ruby lesson, ruby уроки, singleton, user guide, руководство пользователя

The behavior of an instance is determined by its class, but there may be times we know that a particular instance should have special behavior. In most languages, we must go to the trouble of defining another class, which would …

Read
Evgenii Legotckoi
June 27, 2016, 12:43 p.m.

RubyUser Guide #15 - Ruby - access control

access control, Ruby, ruby lesson, ruby уроки, user guide, контроль доступа, руководство пользователя

Earlier, we said that ruby has no functions, only methods. However there is more than one kind of method. In this chapter we introduce access controls .

Consider what happens when we define a method in the "top level", not …

Read
Evgenii Legotckoi
June 27, 2016, 12:41 p.m.

RubyUser Guide #14 - Ruby - Redefinition of methods

Ruby, ruby lesson, ruby уроки, user guide, переопределение методов, руководство пользователя

In a subclass, we can change the behavior of the instances by redefining superclass methods.

  1. ruby> class Human
  2. | def identify
  3. | print "I'm a person.\n"
  4. | end
  5. | def train_toll(age)
  6. | if age < 12
  7. | print "Reduced fare.\n";
Read
Evgenii Legotckoi
June 27, 2016, 12:38 p.m.

RubyUser Guide #13 - Ruby - Inheritance

Inheritance, Ruby, ruby lesson, ruby уроки, user guide, наследование, руководство пользователя

Our classification of objects in everyday life is naturally hierarchical. We know that all cats are mammals , and all mammals are animals . Smaller classes inherit characteristics from the larger classes to which they belong. If all mammals breathe, …

Read
Evgenii Legotckoi
June 26, 2016, 12:36 p.m.

RubyUser Guide #12 - Ruby - classes

class, Ruby, ruby lesson, ruby уроки, user guide, класс, руководство пользователя

The real world is filled by objects, and we can classify them. For example, a very small child is likely to say "bow-wow" when seeing a dog, regardless of the breed; we naturally see the world in terms of these …

Read
Evgenii Legotckoi
June 26, 2016, 12:34 p.m.

RubyUser Guide #11 - Ruby - methods

methods, Ruby, ruby lesson, ruby уроки, user guide, методы, руководство пользователя

What is a method? In OO programming, we don't think of operating on data directly from outside an object; rather, objects have some understanding of how to operate on themselves (when asked nicely to do so). You might say we …

Read
Evgenii Legotckoi
June 26, 2016, 12:24 p.m.

RubyUser Guide #10 - Ruby - Object-oriented thinking

Ruby, ruby lesson, ruby уроки, user guide, ооп, руководство пользователя

Object oriented is a catchy phrase. To call anything object oriented can make you sound pretty smart. Ruby claims to be an object oriented scripting language; but what exactly does "object oriented" mean?

There have been a variety of answers …

Read
Evgenii Legotckoi
June 25, 2016, 12:22 p.m.

RubyUser Guide #09 - Ruby - iterators

interators, Ruby, ruby lesson, ruby уроки, user guide, итераторы, руководство пользователя

Iterators are not an original concept with ruby. They are in common use in object-oriented languages. They are also used in Lisp, though there they are not called iterators. However the concepet of iterator is an unfamiliar one for many …

Read
  • Last comments
  • Evgenii Legotckoi
    April 16, 2025, 5:08 p.m.
    Благодарю за отзыв. И вам желаю всяческих успехов!
  • IscanderChe
    April 12, 2025, 5:12 p.m.
    Добрый день. Спасибо Вам за этот проект и отдельно за ответы на форуме, которые мне очень помогли в некоммерческих пет-проектах. Профессиональным программистом я так и не стал, но узнал мно…
  • AK
    April 1, 2025, 11:41 a.m.
    Добрый день. В данный момент работаю над проектом, где необходимо выводить звук из программы в определенное аудиоустройство (колонки, наушники, виртуальный кабель и т.д). Пишу на Qt5.12.12 поско…
  • Evgenii Legotckoi
    March 9, 2025, 9:02 p.m.
    К сожалению, я этого подсказать не могу, поскольку у меня нет необходимости в обходе блокировок и т.д. Поэтому я и не задавался решением этой проблемы. Ну выглядит так, что вам действитель…
  • VP
    March 9, 2025, 4:14 p.m.
    Здравствуйте! Я устанавливал Qt6 из исходников а также Qt Creator по отдельности. Все компоненты, связанные с разработкой для Android, установлены. Кроме одного... Когда пытаюсь скомпилиров…