Class: Fleakr::Api::TypeOption

Inherits:
SimpleOption show all
Defined in:
lib/fleakr/api/option.rb

Overview

TypeOption

Specify the type of this photo (e.g. photo / screenshot / other)

Instance Attribute Summary

Attributes inherited from SimpleOption

#type

Instance Method Summary collapse

Methods inherited from SimpleOption

#initialize

Constructor Details

This class inherits a constructor from Fleakr::Api::SimpleOption

Instance Method Details

#to_hashObject

Hash representation of this type



154
155
156
# File 'lib/fleakr/api/option.rb', line 154

def to_hash
  {:content_type => value}
end

#valueObject

:nodoc:



144
145
146
147
148
149
150
# File 'lib/fleakr/api/option.rb', line 144

def value # :nodoc:
  case @value
    when :photo       then 1
    when :screenshot  then 2
    when :other       then 3
  end
end