Sha256: e43b762f36d961de3b1ad47266f20c6c86eaba96f45ee9a7449dba5c13ceca30

Contents?: true

Size: 976 Bytes

Versions: 5

Compression:

Stored size: 976 Bytes

Contents

# Copyright (C) 2013  Kouhei Sutou <kou@clear-code.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

module ChupaText
  class TextData < Data
    def initialize(text)
      super()
      self.mime_type = "text/plain"
      self.body = text
      self.size = text.bytesize
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
chupa-text-1.0.4 lib/chupa-text/text-data.rb
chupa-text-1.0.3 lib/chupa-text/text-data.rb
chupa-text-1.0.2 lib/chupa-text/text-data.rb
chupa-text-1.0.1 lib/chupa-text/text-data.rb
chupa-text-1.0.0 lib/chupa-text/text-data.rb