Class: Todoly::Filter
- Inherits:
-
Object
- Object
- Todoly::Filter
- Defined in:
- lib/todoly/filter.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
Class Method Summary collapse
Instance Method Summary collapse
- #[](key) ⇒ Object
-
#initialize(rest_if, obj) ⇒ Filter
constructor
A new instance of Filter.
- #tasks ⇒ Object
Constructor Details
#initialize(rest_if, obj) ⇒ Filter
Returns a new instance of Filter.
10 11 12 13 14 15 |
# File 'lib/todoly/filter.rb', line 10 def initialize(rest_if, obj) @rest_if = rest_if @raw = obj @id = obj["Id"] @name = obj["Content"] end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
17 18 19 |
# File 'lib/todoly/filter.rb', line 17 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
17 18 19 |
# File 'lib/todoly/filter.rb', line 17 def name @name end |
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
17 18 19 |
# File 'lib/todoly/filter.rb', line 17 def raw @raw end |
Class Method Details
.list(rest_if) ⇒ Object
4 5 6 7 8 |
# File 'lib/todoly/filter.rb', line 4 def self.list(rest_if) rest_if.filters.map do |f| self.new(rest_if, f) end end |