Class: Caboose::Message

Inherits:
Object
  • Object
show all
Extended by:
ActiveModel::Naming
Includes:
ActiveModel::Conversion, ActiveModel::Validations
Defined in:
app/models/caboose/message.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Message

Returns a new instance of Message.



12
13
14
# File 'app/models/caboose/message.rb', line 12

def initialize(attributes={})
  attributes.each { |name, value| send("#{name}=", value) }
end

Instance Attribute Details

#bodyObject

Returns the value of attribute body.



7
8
9
# File 'app/models/caboose/message.rb', line 7

def body
  @body
end

#emailObject

Returns the value of attribute email.



7
8
9
# File 'app/models/caboose/message.rb', line 7

def email
  @email
end

#nameObject

Returns the value of attribute name.



7
8
9
# File 'app/models/caboose/message.rb', line 7

def name
  @name
end

Instance Method Details

#persisted?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'app/models/caboose/message.rb', line 16

def persisted?
  false
end