Method: Reddy::Graph#get_by_type
- Defined in:
- lib/reddy/graph.rb
#get_by_type(object) ⇒ Object
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
# File 'lib/reddy/graph.rb', line 151 def get_by_type(object) out = [] each do |t| next unless t.is_type? next unless case object when String object == t.object.to_s when Regexp object.match(t.object.to_s) else object == t.object end out << t.subject end return out end |