Class: FeedMe::Parser
Instance Attribute Summary collapse
-
#fm_options ⇒ Object
readonly
Returns the value of attribute fm_options.
-
#fm_parsed ⇒ Object
readonly
Returns the value of attribute fm_parsed.
-
#fm_source ⇒ Object
readonly
Returns the value of attribute fm_source.
-
#fm_tags ⇒ Object
readonly
Returns the value of attribute fm_tags.
-
#fm_type ⇒ Object
readonly
Returns the value of attribute fm_type.
-
#fm_unparsed ⇒ Object
readonly
Returns the value of attribute fm_unparsed.
Attributes inherited from FeedData
Instance Method Summary collapse
- #channel ⇒ Object (also: #feed)
- #fm_prefix ⇒ Object
- #fm_tag_name ⇒ Object
-
#initialize(builder, source, options = {}) ⇒ Parser
constructor
A new instance of Parser.
Methods inherited from FeedData
#[], #[]=, #call_virtual_method, #delete, #each, #each_with_index, #id, #key?, #keys, #method_missing, #size, #to_indented_s, #to_s, #transform, #transform_value
Constructor Details
#initialize(builder, source, options = {}) ⇒ Parser
Returns a new instance of Parser.
580 581 582 583 584 585 586 587 |
# File 'lib/feedme.rb', line 580 def initialize(builder, source, ={}) super(nil, nil, builder) @fm_source = source.respond_to?(:read) ? source.read : source.to_s @fm_options = Hash.new.update() @fm_parsed = [] @fm_unparsed = [] parse end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class FeedMe::FeedData
Instance Attribute Details
#fm_options ⇒ Object (readonly)
Returns the value of attribute fm_options.
578 579 580 |
# File 'lib/feedme.rb', line 578 def @fm_options end |
#fm_parsed ⇒ Object (readonly)
Returns the value of attribute fm_parsed.
578 579 580 |
# File 'lib/feedme.rb', line 578 def fm_parsed @fm_parsed end |
#fm_source ⇒ Object (readonly)
Returns the value of attribute fm_source.
578 579 580 |
# File 'lib/feedme.rb', line 578 def fm_source @fm_source end |
#fm_tags ⇒ Object (readonly)
Returns the value of attribute fm_tags.
578 579 580 |
# File 'lib/feedme.rb', line 578 def @fm_tags end |
#fm_type ⇒ Object (readonly)
Returns the value of attribute fm_type.
578 579 580 |
# File 'lib/feedme.rb', line 578 def fm_type @fm_type end |
#fm_unparsed ⇒ Object (readonly)
Returns the value of attribute fm_unparsed.
578 579 580 |
# File 'lib/feedme.rb', line 578 def fm_unparsed @fm_unparsed end |
Instance Method Details
#channel ⇒ Object Also known as: feed
589 |
# File 'lib/feedme.rb', line 589 def channel() self end |
#fm_prefix ⇒ Object
596 597 598 |
# File 'lib/feedme.rb', line 596 def fm_prefix fm_type.to_s.downcase end |