Sha256: 05fc7667788dec1461e112d430fc043524efe9f497978b1e352ed44584caaa51

Contents?: true

Size: 305 Bytes

Versions: 2

Compression:

Stored size: 305 Bytes

Contents

require 'espresso/model'

class ExampleModel
  include Espresso::Model
  self.model_modifiers << :safe

  attr_accessor :id, :name, :safe

  def initialize(id = nil, safe = false)
    self.id = id
    self.safe = safe
  end

  def safe?
    safe == true
  end
end

class NonModel
  def id
    6
  end
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
espresso-framework-0.3.0 test/example_model.rb
espresso-0.2.1 test/example_model.rb