Sha256: 8dc2717b4adb1d7145b20f70e459f0a7b53c10d87d4fa309d0b9d8a91732aa98

Contents?: true

Size: 323 Bytes

Versions: 2

Compression:

Stored size: 323 Bytes

Contents

class User
  include NsOptions::HasOptions
  options(:preferences, 'user-preferences') do
    option :home_url
    option :show_messages,  NsOptions::Option::Boolean, :require => true
    option :font_size,      Integer,                    :default => 12
  end

  def preferences_key
    "user_#{self.object_id}"
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ns-options-0.1.1 test/support/user.rb
ns-options-0.1.0 test/support/user.rb