Sha256: ee9cedf1ee4cae15888954080edaddb752fdfbb84f9c9bb0a599b40c784d3f2d

Contents?: true

Size: 433 Bytes

Versions: 1

Compression:

Stored size: 433 Bytes

Contents

require "simplest_status/version"

module SimplestStatus
  autoload :StatusCollection, 'simplest_status/status_collection'
  autoload :ModelMethods,     'simplest_status/model_methods'

  def statuses(*status_list)
    @statuses ||= status_list.reduce(StatusCollection.new) do |collection, status|
      collection.add(status)
    end

    send(:include, ModelMethods) unless ancestors.include? ModelMethods

    @statuses
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
simplest_status-0.1.0 lib/simplest_status.rb