Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

Commit

Permalink
method_missing for missing attr
Browse files Browse the repository at this point in the history
  • Loading branch information
James Wong committed Jul 11, 2017
1 parent 3af723b commit cac51ca
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/ansible_tower_client/base_model.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ def self.endpoint
base_class.to_s.split(/::/)[1].tableize.to_s.freeze
end

def method_missing(m, *args, &block)
self.class.send(:convert_value, m, args, self)
end

# Constructs and returns a new JSON wrapper class. Pass in a plain
# JSON string and it will automatically give you accessor methods
# that make it behave like a typical Ruby object. You may also pass
Expand Down

0 comments on commit cac51ca

Please sign in to comment.