Class: Fleakr::Api::LevelOption
- Inherits:
-
SimpleOption
- Object
- SimpleOption
- Fleakr::Api::LevelOption
- Defined in:
- lib/fleakr/api/option.rb
Overview
LevelOption
Specify the “safety level” of this photo (e.g. safe / moderate / restricted)
Instance Attribute Summary
Attributes inherited from SimpleOption
Instance Method Summary collapse
-
#to_hash ⇒ Object
Hash representation of the safety_level for this photo.
-
#value ⇒ Object
:nodoc:.
Methods inherited from SimpleOption
Constructor Details
This class inherits a constructor from Fleakr::Api::SimpleOption
Instance Method Details
#to_hash ⇒ Object
Hash representation of the safety_level for this photo
132 133 134 |
# File 'lib/fleakr/api/option.rb', line 132 def to_hash {:safety_level => value} end |
#value ⇒ Object
:nodoc:
122 123 124 125 126 127 128 |
# File 'lib/fleakr/api/option.rb', line 122 def value # :nodoc: case @value when :safe then 1 when :moderate then 2 when :restricted then 3 end end |