Class: RestClient::Jogger::Filters::Base
- Inherits:
-
Object
- Object
- RestClient::Jogger::Filters::Base
- Includes:
- ActiveModel::Model
- Defined in:
- lib/rest_client/jogger/filters/base.rb
Constant Summary collapse
- DEFAULT_REPLACEMENT =
'[FILTERED]'.freeze
Instance Attribute Summary collapse
-
#content_type ⇒ Object
Returns the value of attribute content_type.
-
#data ⇒ Object
Returns the value of attribute data.
-
#filter_replacement ⇒ Object
Returns the value of attribute filter_replacement.
-
#filters ⇒ Object
Returns the value of attribute filters.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#content_type ⇒ Object
Returns the value of attribute content_type.
9 10 11 |
# File 'lib/rest_client/jogger/filters/base.rb', line 9 def content_type @content_type end |
#data ⇒ Object
Returns the value of attribute data.
9 10 11 |
# File 'lib/rest_client/jogger/filters/base.rb', line 9 def data @data end |
#filter_replacement ⇒ Object
Returns the value of attribute filter_replacement.
9 10 11 |
# File 'lib/rest_client/jogger/filters/base.rb', line 9 def filter_replacement @filter_replacement end |
#filters ⇒ Object
Returns the value of attribute filters.
9 10 11 |
# File 'lib/rest_client/jogger/filters/base.rb', line 9 def filters @filters end |
Class Method Details
.filter_class(content_type) ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/rest_client/jogger/filters/base.rb', line 11 def self.filter_class(content_type) type = MIME::Types[content_type].first if type && type.sub_type == 'xml' RestClient::Jogger::Filters::Xml else RestClient::Jogger::Filters::Json end end |
Instance Method Details
#filter ⇒ Object
20 21 22 23 24 25 |
# File 'lib/rest_client/jogger/filters/base.rb', line 20 def filter filters.each do |filter| filter_data filter end data end |