class ApiSketch::DSL::AttributeParser
Public Class Methods
new(container_type, &block)
click to toggle source
# File lib/api_sketch/dsl/attribute_parser.rb, line 3 def initialize(container_type, &block) @attribute_values = {} @container_type = container_type # INFO: Such long method name is used to ensure that we are would not have such value as key at hash define_singleton_method(:set_attributes_as_hash_value_format, block) set_attributes_as_hash_value_format end
Public Instance Methods
method_missing(method_name, *arguments, &block)
click to toggle source
# File lib/api_sketch/dsl/attribute_parser.rb, line 11 def method_missing(method_name, *arguments, &block) @attribute_values[method_name] = arguments.first || block end
to_h()
click to toggle source
# File lib/api_sketch/dsl/attribute_parser.rb, line 15 def to_h @attribute_values end