lib/service_contract/avro/protocol.rb in service_contract-0.0.10 vs lib/service_contract/avro/protocol.rb in service_contract-0.1.0
- old
+ new
@@ -19,9 +19,14 @@
def path
File.join(service.path, resource_name)
end
+ def main_type
+ # convert protocol name to a class like name. i.e. "city_state" => "CityState"
+ name.split("_").map{|o| o.capitalize}.join
+ end
+
protected
def resource_name
name.respond_to?(:pluralize) ? name.pluralize : "#{name}s"
end
\ No newline at end of file