Search found 20 matches

by Parki
Sat Jun 27, 2015 8:59 pm
Forum: General
Topic: Ruby. A problem with composition.
Replies: 2
Views: 8095

Ruby. A problem with composition.

Is it possible to make this without going A class outside?
Because when I trying to run the second one it's won't work:
class A
def initialize
@a = 0
end
def event_stuff
@a += 1
end
def get_a
@a
end
end

class RubyEdit
def init
@a = A.new
end
def event
@a.event_stuff
watch @a ...
by Parki
Thu May 14, 2015 1:54 pm
Forum: General
Topic: Problem with RubyEdit class inheritance.
Replies: 7
Views: 14549

Re: Problem with RubyEdit class inheritance.

I found a mistake in the post so I just deleted it.
by Parki
Wed May 13, 2015 5:29 pm
Forum: General
Topic: Problem with RubyEdit class inheritance.
Replies: 7
Views: 14549

Re: Problem with RubyEdit class inheritance.

ah I just got how to solve this, but in a shit code way.
does anyone knows the normal way?
by Parki
Wed May 13, 2015 5:18 pm
Forum: General
Topic: Problem with RubyEdit class inheritance.
Replies: 7
Views: 14549

Re: Problem with RubyEdit class inheritance.

In not a normal way, but it works so thanks you guys,
but today I have some magic for you again.
How do I can get access to @ins array inside class I made?
I think it's gonna work with kind of a method like "get_ins" but where do I can get those methods?
-
By the way I'm I so stupid or it's okay to ...
by Parki
Sun May 10, 2015 2:52 pm
Forum: General
Topic: Problem with RubyEdit class inheritance.
Replies: 7
Views: 14549

Problem with RubyEdit class inheritance.

How to make a class with ability to use Rubyedit class methods?
by Parki
Sun Mar 15, 2015 2:12 pm
Forum: General
Topic: Problem with Ruby.
Replies: 1
Views: 5940

Problem with Ruby.

Look to the file.
by Parki
Sat Mar 14, 2015 7:40 am
Forum: General
Topic: Can't add more then one value to array(solved)
Replies: 1
Views: 6022

Can't add more then one value to array(solved)

WIth this one I can add more then one value to array.
----------------------
def init
@v1 = []
end

def event i,v
v2 = @ins[0]

if i == 1
@v1.push v2
end

watch "v1:",@v1
end
-----------------------
But with this I can't code the same but v1 is local. Does it possible make it with local array ...
by Parki
Tue Mar 10, 2015 2:46 pm
Forum: General
Topic: Ruby.Array.Problem.(Solved)
Replies: 7
Views: 13405

Re: Ruby.Array.Problem.

Thank you guys for your help me with my idiotic problems with syntax.
by Parki
Tue Mar 10, 2015 12:13 pm
Forum: General
Topic: Ruby.Array.Problem.(Solved)
Replies: 7
Views: 13405

Re: Ruby.Array.Problem.

I almost pray for it would be last.
by Parki
Tue Mar 10, 2015 10:01 am
Forum: General
Topic: Me.Problem.Again.(Solved)
Replies: 2
Views: 7169

Re: Me.Problem.Again.

Yep, that's works. Thank you.