Class: PodspecEditor::Spec

Inherits:
Object
  • Object
show all
Defined in:
lib/podspec_editor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_specObject

Returns the value of attribute inner_spec.



25
26
27
# File 'lib/podspec_editor.rb', line 25

def inner_spec
  @inner_spec
end