Sha256: ba81c516d87bab711af3f9ae78a5201e69f420e845f8798bd785368c4e70c6d1
Contents?: true
Size: 595 Bytes
Versions: 1
Compression:
Stored size: 595 Bytes
Contents
require 'miu/resources/content' require 'miu/resources/room' require 'miu/resources/user' module Miu module Resources class TextContent < Content attr_accessor :room, :user, :text def initialize(options = {}) @room = options[:room] || Room.new(options[:room] || {}) @user = options[:user] || User.new(options[:user] || {}) @text = options[:text] super options end def to_hash super.merge({ :room => @room.to_hash, :user => @user.to_hash, :text => @text }) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
miu-0.1.0 | lib/miu/resources/text_content.rb |