date_writer(name, type, disp_name=name) private

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/rss/rss.rb, line 395
    def date_writer(name, type, disp_name=name)
      module_eval("def \#{name}=(new_value)\nif new_value.nil?\n@\#{name} = new_value\nelsif new_value.kind_of?(Time)\n@\#{name} = new_value.dup\nelse\nif @do_validate\nbegin\n@\#{name} = Time.__send__('\#{type}', new_value)\nrescue ArgumentError\nraise NotAvailableValueError.new('\#{disp_name}', new_value)\nend\nelse\n@\#{name} = nil\nif /\\\\A\\\\s*\\\\z/ !~ new_value.to_s\nbegin\nunless Date._parse(new_value, false).empty?\n@\#{name} = Time.parse(new_value)\nend\nrescue ArgumentError\nend\nend\nend\nend\n\n# Is it need?\nif @\#{name}\nclass << @\#{name}\nundef_method(:to_s)\nalias_method(:to_s, :\#{type})\nend\nend\n\nend\n", *get_file_and_line_from_caller(2))
    end
Register or log in to add new notes.