Module: Card::Set::Type::Session

Extended by:
Card::Set
Defined in:
platypus/tmp/set/gem-defaults/mod029-session/type/session.rb

Overview

Set: All “Session” cards

Defined Under Namespace

Modules: HtmlFormat

Constant Summary

Constants included from Helpers

Helpers::SET_PATTERN_TEST_REGEXP

Constants included from Event::Api

Event::Api::OPTIONS

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Card::Set

reset

Methods included from I18nScope

#mod_name, #scope

Methods included from Registrar

#extended, #finalize_load, #process_base_modules, #register_set

Methods included from Helpers

#format_module, #format_modules, #method_missing, #modules, #pattern_code, #respond_to_missing?, #set_name_parts, #shortname, #underscored_name

Methods included from AdvancedApi

#assign_type, #attachment, #define_set_from_error, #ensure_set, #setting_opts, #stage_method

Methods included from Format

#before, #format, layout_method_name, #view, view_method_name, view_setting_method_name, wrapper_method_name

Methods included from Inheritance

#include_set, #include_set_formats

Methods included from Card::Set::Trait

#card_accessor, #card_reader, #card_writer, #require_field

Methods included from Event::Api

#event

Class Method Details

.source_locationObject



7
# File 'platypus/tmp/set/gem-defaults/mod029-session/type/session.rb', line 7

def self.source_location; "/Users/ethan/dev/decko/gem/mod/session/set/type/session.rb"; end

Instance Method Details

#add_to_trash(args) {|args.merge trash: true| ... } ⇒ Object

Yields:

  • (args.merge trash: true)


62
63
64
# File 'platypus/tmp/set/gem-defaults/mod029-session/type/session.rb', line 62

def add_to_trash args
  yield args.merge trash: true
end

#contentObject



40
41
42
# File 'platypus/tmp/set/gem-defaults/mod029-session/type/session.rb', line 40

def content
  db_content || session_content
end

#event: delete_in_sessionObject



49
50
51
52
# File 'platypus/tmp/set/gem-defaults/mod029-session/type/session.rb', line 49

event :delete_in_session, :prepare_to_store, on: :delete do
  self.session_content = nil
  abort :success
end

#event: store_in_sessionObject



44
45
46
47
# File 'platypus/tmp/set/gem-defaults/mod029-session/type/session.rb', line 44

event :store_in_session, :prepare_to_store, on: :save do
  self.session_content = db_content
  abort :success
end

#followable?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'platypus/tmp/set/gem-defaults/mod029-session/type/session.rb', line 20

def followable?
  false
end

#history?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'platypus/tmp/set/gem-defaults/mod029-session/type/session.rb', line 16

def history?
  false
end

#ok_to_create?Boolean

Returns:

  • (Boolean)


54
55
56
# File 'platypus/tmp/set/gem-defaults/mod029-session/type/session.rb', line 54

def ok_to_create?
  true
end

#ok_to_update?Boolean

Returns:

  • (Boolean)


58
59
60
# File 'platypus/tmp/set/gem-defaults/mod029-session/type/session.rb', line 58

def ok_to_update?
  true
end

#recaptcha_on?Boolean

Returns:

  • (Boolean)


24
25
26
# File 'platypus/tmp/set/gem-defaults/mod029-session/type/session.rb', line 24

def recaptcha_on?
  false
end

#session_contentObject



32
33
34
# File 'platypus/tmp/set/gem-defaults/mod029-session/type/session.rb', line 32

def session_content
  Env.session[session_key]
end

#session_content=(val) ⇒ Object



36
37
38
# File 'platypus/tmp/set/gem-defaults/mod029-session/type/session.rb', line 36

def session_content= val
  Env.session[session_key] = val
end

#session_keyObject



28
29
30
# File 'platypus/tmp/set/gem-defaults/mod029-session/type/session.rb', line 28

def session_key
  "_card_#{key}"
end

#virtual?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'platypus/tmp/set/gem-defaults/mod029-session/type/session.rb', line 12

def virtual?
  session_content.present?
end