Skip to content

Instantly share code, notes, and snippets.

View zgfif's full-sized avatar
🙃

Pasha Bratanov zgfif

🙃
  • Odesa, Ukraine
View GitHub Profile
@zgfif
zgfif / superhero.rb
Last active December 29, 2018 20:57
require 'active_model'
class Superhero
include ActiveModel::Validations
attr_accessor :name, :age
def initialize **args
@name = args[:name]
class Arsenal
def self.hello
'Hello as class method!'
end
def mymy
'Arsen Wenger'
end
require 'active_model'
class Superhero
include ActiveModel::Validations
@@total = []
attr_reader :name, :age
def initialize name, age
@name = name