Module: Whois::ParserExtensions::WhoisRecord::ClassMethods
- Defined in:
- lib/whois/parser_extensions/whois_record.rb
Instance Method Summary collapse
- #define_method_method(method) ⇒ Object private
- #define_property_method(method) ⇒ Object private
- #define_question_method(method) ⇒ Object private
Instance Method Details
#define_method_method(method) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
210 211 212 213 214 215 216 |
# File 'lib/whois/parser_extensions/whois_record.rb', line 210 def define_method_method(method) class_eval <<-RUBY, __FILE__, __LINE__ + 1 def #{method}(*args, &block) parser.#{method}(*args, &block) end RUBY end |
#define_property_method(method) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
201 202 203 204 205 206 207 |
# File 'lib/whois/parser_extensions/whois_record.rb', line 201 def define_property_method(method) class_eval <<-RUBY, __FILE__, __LINE__ + 1 def #{method}(*args, &block) parser.#{method}(*args, &block) end RUBY end |
#define_question_method(method) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
219 220 221 222 223 224 225 |
# File 'lib/whois/parser_extensions/whois_record.rb', line 219 def define_question_method(method) class_eval <<-RUBY, __FILE__, __LINE__ + 1 def #{method}? !#{method}.nil? end RUBY end |