Module: Card::Set::All::States

Extended by:
Card::Set
Defined in:
tmpsets/set/mod001-01_core/all/states.rb

Instance Method Summary collapse

Methods included from Card::Set

abstract_set?, all_set?, card_accessor, card_reader, card_writer, clean_empty_module_from_hash, clean_empty_modules, define_on_format, ensure_set, extended, format, process_base_module_list, process_base_modules, register_set, register_set_format, shortname, stage_method, view, write_tmp_file

Methods included from Event

#define_event, #event

Instance Method Details

#known?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'tmpsets/set/mod001-01_core/all/states.rb', line 10

def known?
  real? || virtual?
end

#new_card?Boolean Also known as: new?

~~~~~~~~~~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/01_core/set/all/states.rb ~~~~~~~~~~~

Returns:

  • (Boolean)


4
5
6
7
# File 'tmpsets/set/mod001-01_core/all/states.rb', line 4

def new_card?
  new_record? ||   # not yet in db (from ActiveRecord)
  !!@from_trash    # in process of restoration from trash, not yet "re-created"
end

#pristine?Boolean

Returns:

  • (Boolean)


22
23
24
25
# File 'tmpsets/set/mod001-01_core/all/states.rb', line 22

def pristine?
  # has not been edited directly by human users.  bleep blorp.
  new_card? or !actions.joins(:act).where('card_acts.actor_id != ?', Card::WagnBotID).exists?
end

#real?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'tmpsets/set/mod001-01_core/all/states.rb', line 14

def real?
  !new_card?
end

#unknown?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'tmpsets/set/mod001-01_core/all/states.rb', line 18

def unknown?
  !known?
end