Class: Parade::Metadata::Assignment
- Inherits:
-
Object
- Object
- Parade::Metadata::Assignment
- Defined in:
- lib/parade/metadata/assignment.rb
Overview
The Assignment metadata parser is a general parser that allows the ability to assign a value to the specified field of the metadata. This is usually used for assigning the transition field but could be used to set the id in the metadata.
Instance Method Summary collapse
Instance Method Details
#apply(term, hash) ⇒ Object
23 24 25 26 27 |
# File 'lib/parade/metadata/assignment.rb', line 23 def apply(term,hash) key, value = parse(term) hash[key] = value hash end |
#match?(term) ⇒ Boolean
19 20 21 |
# File 'lib/parade/metadata/assignment.rb', line 19 def match?(term) term =~ /.+=.+/ end |