lovehandle / motion_virtus

A RubyMotion port of virtus
4 stars 0 forks source link

Accessor visibility options do not work #1

Open lovehandle opened 11 years ago

lovehandle commented 11 years ago
class User
  include Virtus
  attribute :first_name, String, :writer  => :private
  attribute :last_name, String, :reader => :private
end

$ user = User.new(:first_name => 'Ryan', :last_name => 'Closner')
$ user.first_name = "Not Ryan" #=> "Not Ryan"
$ user.last_name #=> "Closner"
lovehandle commented 11 years ago

This has to do with a bug in RubyMotion illustrated here.

@solnic - looks like RM has some work to do on how they handle Modules before Virtus can use accessor visibility methods.