Method: Threatinator::FeedBuilder.from_string
- Defined in:
- lib/threatinator/feed_builder.rb
.from_string(str, filename = nil, lineno = nil) ⇒ Object
Generates a builder from a string via eval.
137 138 139 140 141 142 143 144 145 146 147 148 |
# File 'lib/threatinator/feed_builder.rb', line 137 def self.from_string(str, filename = nil, lineno = nil) from_dsl do args = [str, binding] unless filename.nil? args << filename unless lineno.nil? args << lineno end end eval(*args) end end |