Class: Apiture::Swagger::DefinitionReference
- Defined in:
- lib/apiture/swagger/definition_reference.rb
Instance Attribute Summary collapse
-
#ref ⇒ Object
readonly
Returns the value of attribute ref.
Attributes inherited from Node
Instance Method Summary collapse
- #definitionId ⇒ Object
-
#initialize(ref) ⇒ DefinitionReference
constructor
A new instance of DefinitionReference.
Methods inherited from Node
attribute, attribute_names, #collect_errors, collect_errors, #extensions, hash, hash_names, inherited, list, list_names, #serializable_hash, #to_json, #valid?, #validate
Methods included from Utils::Inflections
acronym_regex, acronyms, #camelize, #constantize, #underscore
Constructor Details
#initialize(ref) ⇒ DefinitionReference
Returns a new instance of DefinitionReference.
7 8 9 |
# File 'lib/apiture/swagger/definition_reference.rb', line 7 def initialize(ref) @ref = ref end |
Instance Attribute Details
#ref ⇒ Object (readonly)
Returns the value of attribute ref.
5 6 7 |
# File 'lib/apiture/swagger/definition_reference.rb', line 5 def ref @ref end |
Instance Method Details
#definitionId ⇒ Object
11 12 13 |
# File 'lib/apiture/swagger/definition_reference.rb', line 11 def definitionId @ref.split('/').last end |