Class: PodspecEditor::Spec
- Inherits:
-
Object
- Object
- PodspecEditor::Spec
- Defined in:
- lib/podspec_editor.rb
Instance Attribute Summary collapse
-
#inner_spec ⇒ Object
Returns the value of attribute inner_spec.
Instance Method Summary collapse
-
#initialize(json_content) ⇒ Spec
constructor
A new instance of Spec.
-
#method_missing(method, *args, &block) ⇒ Object
read.
Constructor Details
#initialize(json_content) ⇒ Spec
Returns a new instance of Spec.
27 28 29 |
# File 'lib/podspec_editor.rb', line 27 def initialize(json_content) @inner_spec = JSON.parse(json_content, object_class: OpenStruct) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
read
32 33 34 |
# File 'lib/podspec_editor.rb', line 32 def method_missing(method, *args, &block) inner_spec.send(method, *args, &block) end |
Instance Attribute Details
#inner_spec ⇒ Object
Returns the value of attribute inner_spec.
25 26 27 |
# File 'lib/podspec_editor.rb', line 25 def inner_spec @inner_spec end |