Sha256: 4b35e9e67fd6d62aa9119317d979c3dbb9345c2e2605521e37b4156fdb4388c3

Contents?: true

Size: 876 Bytes

Versions: 5

Compression:

Stored size: 876 Bytes

Contents

class User
  aquatic :embed => { :stub => :username }
  
  attr_accessor :name, # An array of strings or a hash of strings 
    :created_at,# Time
    :dob,       # Date
    :username,  # simple string 
    :log,       # an Aquatic Object 
    :password,  # hidden value
    :grab_bag,   # non Aquatic Object
    :other_user # a non-embeddable Aquatic Object
  hide_attributes :password
  
  def initialize( hash={} )
    hash.each do |key, value|
      send( "#{key}=", value )
    end  
  end  
  
  
  # convenience methods for inspection during testing
  # ------------------------------------------------- 
  
  def simple_classes
    _simple_classes
  end 
  
  # for testing whether attributse are hidden
  def visible_attr 
    _storable_attributes
  end

  # for testing class level configuration options
  def self.aquatic_options
    _aqua_opts
  end
         
end 

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
baccigalupi-aqua-0.1.3 spec/object/object_fixtures/user.rb
baccigalupi-aqua-0.1.4 spec/object/object_fixtures/user.rb
baccigalupi-aqua-0.1.5 spec/object/object_fixtures/user.rb
aqua-0.2.0 spec/object/object_fixtures/user.rb
aqua-0.1.6 spec/object/object_fixtures/user.rb