Sha256: a85bbb7107172f97fd357fdd6fcf294ea5acdbb72079fd1f7fe14da9742436ef

Contents?: true

Size: 445 Bytes

Versions: 3

Compression:

Stored size: 445 Bytes

Contents

require 'active_model'

module CanTango
  module Model
    module Guest
      def self.included(base)
        base.extend  ::ActiveModel::Naming
        base.send :include, ::ActiveModel::Conversion
        base.send :include, ::ActiveModel::Validations
      end

      def email
        'guest@info.com'
      end

      def has_role? role
        role.to_sym == :guest
      end

      def persisted?
        false
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cantango-core-0.1.2 lib/cantango/model/guest.rb
cantango-core-0.1.1 lib/cantango/model/guest.rb
cantango-core-0.1.0 lib/cantango/model/guest.rb