Class: Reporter::Scope::Base
- Inherits:
-
Object
- Object
- Reporter::Scope::Base
- Defined in:
- lib/reporter/scope/base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#limit ⇒ Object
Returns the value of attribute limit.
-
#mappings ⇒ Object
readonly
Returns the value of attribute mappings.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #apply_on(source) ⇒ Object
- #change(value) ⇒ Object
-
#initialize(scoping, name, data_source, mappings) ⇒ Base
constructor
A new instance of Base.
- #iterate(&block) ⇒ Object
- #value ⇒ Object
Constructor Details
#initialize(scoping, name, data_source, mappings) ⇒ Base
Returns a new instance of Base.
3 4 5 6 7 8 9 |
# File 'lib/reporter/scope/base.rb', line 3 def initialize scoping, name, data_source, mappings @data_source = data_source @scoping = scoping @name = name @mappings = scoping.normalize_mapping mappings @limit = nil end |
Instance Attribute Details
#limit ⇒ Object
Returns the value of attribute limit.
31 32 33 |
# File 'lib/reporter/scope/base.rb', line 31 def limit @limit end |
#mappings ⇒ Object (readonly)
Returns the value of attribute mappings.
31 32 33 |
# File 'lib/reporter/scope/base.rb', line 31 def mappings @mappings end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
31 32 33 |
# File 'lib/reporter/scope/base.rb', line 31 def name @name end |
Instance Method Details
#apply_on(source) ⇒ Object
23 24 25 |
# File 'lib/reporter/scope/base.rb', line 23 def apply_on source raise NotImplementedError end |
#change(value) ⇒ Object
15 16 17 |
# File 'lib/reporter/scope/base.rb', line 15 def change value raise NotImplementedError end |
#iterate(&block) ⇒ Object
27 28 29 |
# File 'lib/reporter/scope/base.rb', line 27 def iterate &block raise NotImplementedError end |
#value ⇒ Object
19 20 21 |
# File 'lib/reporter/scope/base.rb', line 19 def value raise NotImplementedError end |