Class: SendgridTemplateEngine::Version
- Inherits:
-
Object
- Object
- SendgridTemplateEngine::Version
- Defined in:
- lib/versions.rb
Instance Attribute Summary collapse
-
#active ⇒ Object
Returns the value of attribute active.
-
#html_content ⇒ Object
Returns the value of attribute html_content.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#plain_content ⇒ Object
Returns the value of attribute plain_content.
-
#subject ⇒ Object
Returns the value of attribute subject.
-
#template_id ⇒ Object
Returns the value of attribute template_id.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
Class Method Summary collapse
Instance Method Summary collapse
- #set_active(active) ⇒ Object
- #set_html_content(html_content) ⇒ Object
- #set_name(name) ⇒ Object
- #set_plain_content(plain_content) ⇒ Object
- #set_subject(subject) ⇒ Object
- #to_hash ⇒ Object
Instance Attribute Details
#active ⇒ Object
Returns the value of attribute active.
62 63 64 |
# File 'lib/versions.rb', line 62 def active @active end |
#html_content ⇒ Object
Returns the value of attribute html_content.
62 63 64 |
# File 'lib/versions.rb', line 62 def html_content @html_content end |
#id ⇒ Object
Returns the value of attribute id.
62 63 64 |
# File 'lib/versions.rb', line 62 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
62 63 64 |
# File 'lib/versions.rb', line 62 def name @name end |
#plain_content ⇒ Object
Returns the value of attribute plain_content.
62 63 64 |
# File 'lib/versions.rb', line 62 def plain_content @plain_content end |
#subject ⇒ Object
Returns the value of attribute subject.
62 63 64 |
# File 'lib/versions.rb', line 62 def subject @subject end |
#template_id ⇒ Object
Returns the value of attribute template_id.
62 63 64 |
# File 'lib/versions.rb', line 62 def template_id @template_id end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
62 63 64 |
# File 'lib/versions.rb', line 62 def updated_at @updated_at end |
Class Method Details
.create(value) ⇒ Object
64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/versions.rb', line 64 def self.create(value) obj = Version.new obj.id = value["id"] obj.template_id = value["template_id"] obj.active = value["active"] obj.name = value["name"] obj.html_content = value["html_content"] obj.plain_content = value["plain_content"] obj.subject = value["subject"] obj.updated_at = value["updated_at"] obj end |
Instance Method Details
#set_active(active) ⇒ Object
108 109 110 111 |
# File 'lib/versions.rb', line 108 def set_active(active) @active = active self end |
#set_html_content(html_content) ⇒ Object
98 99 100 101 |
# File 'lib/versions.rb', line 98 def set_html_content(html_content) @html_content = html_content self end |
#set_name(name) ⇒ Object
88 89 90 91 |
# File 'lib/versions.rb', line 88 def set_name(name) @name = name self end |
#set_plain_content(plain_content) ⇒ Object
103 104 105 106 |
# File 'lib/versions.rb', line 103 def set_plain_content(plain_content) @plain_content = plain_content self end |
#set_subject(subject) ⇒ Object
93 94 95 96 |
# File 'lib/versions.rb', line 93 def set_subject(subject) @subject = subject self end |
#to_hash ⇒ Object
77 78 79 80 81 82 83 84 85 86 |
# File 'lib/versions.rb', line 77 def to_hash hash = { "active" => @active, "name" => @name, "html_content" => @html_content, "plain_content" => @plain_content, "subject" => @subject, } hash end |