Class: FlatApi::ScoreLicense
- Inherits:
-
Object
- Object
- FlatApi::ScoreLicense
- Defined in:
- lib/flat_api/models/score_license.rb
Constant Summary collapse
- COPYRIGHT =
"copyright".freeze
- CC0 =
"cc0".freeze
- CC_BY =
"cc-by".freeze
- CC_BY_SA =
"cc-by-sa".freeze
- CC_BY_ND =
"cc-by-nd".freeze
- CC_BY_NC =
"cc-by-nc".freeze
- CC_BY_NC_SA =
"cc-by-nc-sa".freeze
- CC_BY_NC_ND =
"cc-by-nc-nd".freeze
Instance Method Summary collapse
-
#build_from_hash(value) ⇒ String
Builds the enum from string.
Instance Method Details
#build_from_hash(value) ⇒ String
Builds the enum from string
30 31 32 33 34 |
# File 'lib/flat_api/models/score_license.rb', line 30 def build_from_hash(value) constantValues = ScoreLicense.constants.select{|c| ScoreLicense::const_get(c) == value} raise "Invalid ENUM value #{value} for class #ScoreLicense" if constantValues.empty? value end |