Class: Yandex::Webmaster::Api::Attributes::Types::Boolean
- Defined in:
- lib/yandex-webmaster/api/attributes/types/boolean.rb
Class Method Summary collapse
Methods inherited from Base
Class Method Details
.default_reader_aliases(method_name) ⇒ Object
14 15 16 |
# File 'lib/yandex-webmaster/api/attributes/types/boolean.rb', line 14 def self.default_reader_aliases(method_name) super.push("#{method_name}?").flatten.uniq end |
.typecast(value, options = {}) ⇒ Object
9 10 11 12 |
# File 'lib/yandex-webmaster/api/attributes/types/boolean.rb', line 9 def self.typecast(value, = {}) return true if ['yes', '1', 1, 'true', true].include?(value) return false end |