Sha256: f015d159e4ad3b4b93780842c0df72b860a7efba6109b4d1ad30026045fa17e9
Contents?: true
Size: 560 Bytes
Versions: 16
Compression:
Stored size: 560 Bytes
Contents
module Qbrick class PublishState extend ActiveModel::Translation UNPUBLISHED = 0 PUBLISHED = 1 PUBLISHED_AT = 2 attr_reader :name attr_reader :value def initialize(options) options.each_pair { |k, v| instance_variable_set("@#{k}", v) if respond_to?(k) } end def self.all @all ||= [ PublishState.new(name: 'published', value: PUBLISHED), PublishState.new(name: 'unpublished', value: UNPUBLISHED), PublishState.new(name: 'published_at', value: PUBLISHED_AT) ] end end end
Version data entries
16 entries across 16 versions & 1 rubygems