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.



26
27
28
# File 'lib/podspec/editor.rb', line 26

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



31
32
33
# File 'lib/podspec/editor.rb', line 31

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.



24
25
26
# File 'lib/podspec/editor.rb', line 24

def inner_spec
  @inner_spec
end