Sha256: 7c039e396fcea47025d0c622f84696be1b7e2f60ac325187f8afb57141025059

Contents?: true

Size: 296 Bytes

Versions: 3

Compression:

Stored size: 296 Bytes

Contents

# frozen_string_literal: true
# Example class
class Dog < LazyRecord::Base
  lr_attr_accessor :name, :breed, :weight
  lr_has_many :friends

  def initialize(opts = {})
    super
    friends << Friend.new(opts) if opts[:friend] == true
    self.name = name + 'y' if opts[:cute] == true
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
lazy_record-0.2.1 example/dog.rb
lazy_record-0.2.0 example/dog.rb
lazy_record-0.1.9 example/dog.rb