Class: Ruml::List
- Inherits:
-
Object
- Object
- Ruml::List
- Defined in:
- lib/ruml/list.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
Instance Method Summary collapse
- #bounce_to ⇒ Object
- #id ⇒ Object
-
#initialize(path) ⇒ List
constructor
A new instance of List.
- #members ⇒ Object
- #name ⇒ Object
- #path ⇒ Object
- #to ⇒ Object
Constructor Details
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
3 4 5 |
# File 'lib/ruml/list.rb', line 3 def config @config end |
Instance Method Details
#bounce_to ⇒ Object
29 30 31 |
# File 'lib/ruml/list.rb', line 29 def bounce_to @bounce_to ||= lines("bounce_to").first || to end |
#id ⇒ Object
13 14 15 |
# File 'lib/ruml/list.rb', line 13 def id @id ||= to.gsub('@', '.') end |
#members ⇒ Object
21 22 23 |
# File 'lib/ruml/list.rb', line 21 def members @members ||= lines("members").map(&:downcase).uniq.reject { |member| member =~ /^#|^$/ } end |
#name ⇒ Object
17 18 19 |
# File 'lib/ruml/list.rb', line 17 def name @name ||= lines("name").first end |
#path ⇒ Object
9 10 11 |
# File 'lib/ruml/list.rb', line 9 def path config.path end |
#to ⇒ Object
25 26 27 |
# File 'lib/ruml/list.rb', line 25 def to @to ||= lines("to").first end |