2014-03-01から1日間の記事一覧
hoge1 = Hoge.new puts hoge1.hoge puts hoge1.foo hoge2 = Hoge.new({hoge: 'hoge2'}) puts hoge2.hoge puts hoge2.foo hoge3 = Hoge.new({foo: 'foo2'}) puts hoge3.hoge puts hoge3.foo hoge3 = Hoge.new({hoge: 'hoge2',foo: 'foo2'}) puts hoge3.hoge p…
class Hoge attr_reader :read attr_writer :write attr_accessor :access def initialize(read, write, access) @read = read @write = write @access = access end def access_update @access = @write end end hoge = Hoge.new('read', 'write', 'access'…