Class: Fog::Attributes::Integer
- Defined in:
- lib/fog/core/attributes/integer.rb
Overview
Fog Integer Attribute
This class handles Integer attributes from the providers, converting values to Integer objects
Instance Attribute Summary
Attributes inherited from Default
#aliases, #as, #default, #model, #name, #squash
Instance Method Summary collapse
Methods inherited from Default
#create_aliases, #create_getter, #create_mask, #initialize, #set_defaults
Constructor Details
This class inherits a constructor from Fog::Attributes::Default
Instance Method Details
#create_setter ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/fog/core/attributes/integer.rb', line 8 def create_setter model.class_eval <<-EOS, __FILE__, __LINE__ def #{name}=(new_#{name}) attributes[:#{name}] = new_#{name}.to_i end EOS end |