Sha256: a60670b83ef0e91018b70212d7e01a2a5fdc7c73aa3778a91f8af6310796c489
Contents?: true
Size: 635 Bytes
Versions: 6
Compression:
Stored size: 635 Bytes
Contents
module RelatonIho class CommentPeriond # @return [Date] attr_reader :from # @return [Date, NilClass] attr_reader :to # @param from [String] date # @parma to [String, NilClass] date def initialize(from:, to: nil) @from = Date.parse from @to = Date.parse to if to end # @param builder [Nokogiri::XML::builder] def to_xml(builder) builder.commentperiod do builder.from from.to_s builder.to to.to_s if to end end # @return [Hash] def to_hash hash = { "from" => from.to_s } hash["to"] = to.to_s if to hash end end end
Version data entries
6 entries across 6 versions & 2 rubygems