Class: Oxidized::Model::Outputs
- Inherits:
-
Object
- Object
- Oxidized::Model::Outputs
- Defined in:
- lib/oxidized/model/outputs.rb
Instance Method Summary collapse
- #<<(output) ⇒ Object
- #all ⇒ Object
- #to_cfg ⇒ Object
- #type(type) ⇒ Object
- #type_to_str(want_type) ⇒ Object
- #types ⇒ Object
- #unshift(output) ⇒ Object
Instance Method Details
#<<(output) ⇒ Object
13 14 15 |
# File 'lib/oxidized/model/outputs.rb', line 13 def << output @outputs << output end |
#all ⇒ Object
21 22 23 |
# File 'lib/oxidized/model/outputs.rb', line 21 def all @outputs end |
#to_cfg ⇒ Object
5 6 7 |
# File 'lib/oxidized/model/outputs.rb', line 5 def to_cfg type_to_str(nil) end |
#type(type) ⇒ Object
25 26 27 |
# File 'lib/oxidized/model/outputs.rb', line 25 def type type @outputs.select { |out| out.type==type } end |
#type_to_str(want_type) ⇒ Object
9 10 11 |
# File 'lib/oxidized/model/outputs.rb', line 9 def type_to_str want_type type(want_type).map { |out| out }.join end |
#types ⇒ Object
29 30 31 |
# File 'lib/oxidized/model/outputs.rb', line 29 def types @outputs.map { |out| out.type }.uniq.compact end |
#unshift(output) ⇒ Object
17 18 19 |
# File 'lib/oxidized/model/outputs.rb', line 17 def unshift output @outputs.unshift output end |