lib/chirrin-chirrion.rb in chirrin-chirrion-0.4.1 vs lib/chirrin-chirrion.rb in chirrin-chirrion-0.5.1
- old
+ new
@@ -27,9 +27,10 @@
#
# ChirrinChirrion.add_toggle('my_active_feature')
# ChirrinChirrion.add_toggle('my_inactive_feature')
#
def self.add_toggle(toggle_name, toggle_info = {})
+ fail(ChirrinChirrion::Errors::ToggleIsRequired, 'Toggle name has not been sent.') if toggle_name.nil? || toggle_name.empty?
database_adapter.add_toggle(toggle_name, toggle_info)
end
# Removes a toggle from the database
#