Sha256: e6b7db738dea75a9afbcf346cb49022756db6714210309753ca512433fc1a39d

Contents?: true

Size: 545 Bytes

Versions: 29

Compression:

Stored size: 545 Bytes

Contents

module PushType
  class Structure

    attr_accessor :field_store

    include ActiveModel::Model
    include ActiveRecord::AttributeAssignment
    include ActiveRecord::Store
    
    extend ActiveModel::Callbacks
    define_model_callbacks :initialize, only: :after

    include PushType::Customizable
    include PushType::Presentable

    def initialize(*args)
      run_callbacks :initialize do
        @field_store ||= {}
        super
      end
    end

    def blank?
      fields.map { |k, f| f.value }.all?(&:blank?)
    end

  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
push_type_core-0.12.1 app/models/push_type/structure.rb
push_type_core-0.12.0 app/models/push_type/structure.rb
push_type_core-0.12.0.beta.1 app/models/push_type/structure.rb
push_type_core-0.11.2 app/models/push_type/structure.rb
push_type_core-0.11.1 app/models/push_type/structure.rb
push_type_core-0.11.0.beta.2 app/models/push_type/structure.rb
push_type_core-0.11.0.beta.1 app/models/push_type/structure.rb
push_type_core-0.10.4 app/models/push_type/structure.rb
push_type_core-0.10.3 app/models/push_type/structure.rb
push_type_core-0.10.2 app/models/push_type/structure.rb
push_type_core-0.10.1 app/models/push_type/structure.rb
push_type_core-0.10.0 app/models/push_type/structure.rb
push_type_core-0.10.0.beta.5 app/models/push_type/structure.rb
push_type_core-0.10.0.beta.3 app/models/push_type/structure.rb
push_type_core-0.9.5 app/models/push_type/structure.rb
push_type_core-0.9.3 app/models/push_type/structure.rb
push_type_core-0.9.2 app/models/push_type/structure.rb
push_type_core-0.9.1 app/models/push_type/structure.rb
push_type_core-0.9.0 app/models/push_type/structure.rb
push_type_core-0.9.0.beta.4 app/models/push_type/structure.rb