Class: Antwort::EmailData
- Inherits:
-
Object
- Object
- Antwort::EmailData
- Includes:
- Helpers
- Defined in:
- lib/antwort/email/data.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#file ⇒ Object
readonly
Returns the value of attribute file.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ EmailData
constructor
A new instance of EmailData.
Methods included from Helpers
Constructor Details
#initialize(opts = {}) ⇒ EmailData
Returns a new instance of EmailData.
9 10 11 12 13 14 |
# File 'lib/antwort/email/data.rb', line 9 def initialize(opts = {}) @name = opts[:name] || '' @path = (opts[:path] || Dir.pwd) + '/data' @file = opts[:file] || "#{@path}/#{@name}.yml" @data = load_yaml_data end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
7 8 9 |
# File 'lib/antwort/email/data.rb', line 7 def data @data end |
#file ⇒ Object (readonly)
Returns the value of attribute file.
7 8 9 |
# File 'lib/antwort/email/data.rb', line 7 def file @file end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'lib/antwort/email/data.rb', line 7 def name @name end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
7 8 9 |
# File 'lib/antwort/email/data.rb', line 7 def path @path end |