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
14 15 16 |
# File 'lib/oxidized/model/outputs.rb', line 14 def <<(output) @outputs << output end |
#all ⇒ Object
22 23 24 |
# File 'lib/oxidized/model/outputs.rb', line 22 def all @outputs end |
#to_cfg ⇒ Object
6 7 8 |
# File 'lib/oxidized/model/outputs.rb', line 6 def to_cfg type_to_str(nil) end |
#type(type) ⇒ Object
26 27 28 |
# File 'lib/oxidized/model/outputs.rb', line 26 def type(type) @outputs.select { |out| out.type == type } end |
#type_to_str(want_type) ⇒ Object
10 11 12 |
# File 'lib/oxidized/model/outputs.rb', line 10 def type_to_str(want_type) type(want_type).map { |out| out }.join end |
#types ⇒ Object
30 31 32 |
# File 'lib/oxidized/model/outputs.rb', line 30 def types @outputs.map { |out| out.type }.uniq.compact end |
#unshift(output) ⇒ Object
18 19 20 |
# File 'lib/oxidized/model/outputs.rb', line 18 def unshift(output) @outputs.unshift output end |