Module: Qiita::Team::Services::Properties
- Defined in:
- lib/qiita/team/services/properties.rb,
lib/qiita/team/services/properties/base.rb,
lib/qiita/team/services/properties/string_property.rb,
lib/qiita/team/services/properties/boolean_property.rb
Defined Under Namespace
Classes: Base, BooleanProperty, StringProperty
Class Method Summary collapse
Class Method Details
.create(name, type, default) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/qiita/team/services/properties.rb', line 7 def create(name, type, default) # NOTE: Property name must be a string instance to serialize and # deserialize correctly. case type when :string StringProperty.new(name.to_s, default) when :boolean BooleanProperty.new(name.to_s, default) else ArgumentError end end |