class Virtus::Attribute
Public Instance Methods
define_accessor_methods(attribute_set)
click to toggle source
# File lib/pineapples/templates/lib/virtus/virtus.rb, line 4 def define_accessor_methods(attribute_set) attribute_set.define_reader_method(self, name, options[:reader]) attribute_set.define_writer_method(self, "#{name}=", options[:writer]) attribute_set.define_presence_method(self, "#{name}?", options[:reader]) end