Module: SimplestStatus

Defined in:
lib/simplest_status.rb,
lib/simplest_status/status.rb,
lib/simplest_status/version.rb,
lib/simplest_status/model_methods.rb,
lib/simplest_status/status_collection.rb

Defined Under Namespace

Classes: ModelMethods, Status, StatusCollection

Constant Summary collapse

VERSION =
"1.0.0"

Instance Method Summary collapse

Instance Method Details

#simple_status(field_name, values) ⇒ Object



11
12
13
# File 'lib/simplest_status.rb', line 11

def simple_status(field_name, values)
  status_collection_for(field_name, values).configure_for(self)
end

#statuses(*status_list) ⇒ Object



7
8
9
# File 'lib/simplest_status.rb', line 7

def statuses(*status_list)
  instance_variable_get(:@statuses) || simple_status(:status, status_list)
end