Class: Yandex::Webmaster::Api::Attributes::ReaderBuilder
- Inherits:
-
AccessorBuilder
- Object
- AccessorBuilder
- Yandex::Webmaster::Api::Attributes::ReaderBuilder
- Defined in:
- lib/yandex-webmaster/api/attributes/reader_builder.rb
Instance Attribute Summary
Attributes inherited from AccessorBuilder
#attribute_name, #object, #options, #type
Instance Method Summary collapse
Methods inherited from AccessorBuilder
#define_aliases, #initialize, #instance_variable_name, #method_name_from_options, #method_visibility, #method_visibility_from_options
Constructor Details
This class inherits a constructor from Yandex::Webmaster::Api::Attributes::AccessorBuilder
Instance Method Details
#accessor ⇒ Object
11 12 13 |
# File 'lib/yandex-webmaster/api/attributes/reader_builder.rb', line 11 def accessor :reader end |
#define_method ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/yandex-webmaster/api/attributes/reader_builder.rb', line 19 def define_method unless self.object.method_defined?(self.method_name) self.object.class_eval(<<-EOS, __FILE__, __LINE__ + 1) def #{method_name} instance_variable_get(:#{instance_variable_name.to_s}) end EOS self.object.send self.method_visibility, self.method_name self end end |
#method_name ⇒ Object
15 16 17 |
# File 'lib/yandex-webmaster/api/attributes/reader_builder.rb', line 15 def method_name self. || self.attribute_name end |