Sha256: e172f3c6541c038b3cfc958bdc79f39db83f8ea26795b376a226335d1fb59bfa
Contents?: true
Size: 911 Bytes
Versions: 67
Compression:
Stored size: 911 Bytes
Contents
# A YARD handler to deal with the "property" DSL method. class PropertyDslHandler < YARD::Handlers::Ruby::Base handles method_call(:property) namespace_only # Do not process nested method calls. def process name = statement.parameters.first.jump(:tstring_content, :ident).source object = YARD::CodeObjects::MethodObject.new(namespace, name) object.parameters = [['value', nil]] register(object) cf_property = statement.parameters[1].source docstring = <<-DOC @overload #{name} Returns the value of the #{cf_property} CloudFormation property. @overload #{name}(value) Sets the #{cf_property} CloudFormation property. @param value the value to set the #{cf_property} CloudFormation property to. DOC object.docstring = docstring if object.docstring.blank?(false) # modify the object object.dynamic = true object.scope = :instance object.name end end
Version data entries
67 entries across 67 versions & 1 rubygems