Class: Renderer::Entities::AttributeDefinition
- Defined in:
- lib/renderer/entities/attribute_definition.rb
Instance Attribute Summary collapse
-
#defined_by ⇒ Object
readonly
Returns the value of attribute defined_by.
-
#doc ⇒ Object
readonly
Returns the value of attribute doc.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#parent ⇒ Object
readonly
Returns the value of attribute parent.
-
#reader_visibility ⇒ Object
readonly
Returns the value of attribute reader_visibility.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#writer_visibility ⇒ Object
readonly
Returns the value of attribute writer_visibility.
Instance Method Summary collapse
- #accessor? ⇒ Boolean
-
#initialize(parent, model) ⇒ AttributeDefinition
constructor
A new instance of AttributeDefinition.
- #reader? ⇒ Boolean
- #writer? ⇒ Boolean
Constructor Details
#initialize(parent, model) ⇒ AttributeDefinition
Returns a new instance of AttributeDefinition.
8 9 10 11 12 13 14 15 16 |
# File 'lib/renderer/entities/attribute_definition.rb', line 8 def initialize(parent, model) @parent = parent @defined_by = model[:defined_by] @doc = model[:doc] # TODO @name = model[:name] @reader_visibility = model[:reader_visibility].to_sym @writer_visibility = model[:writer_visibility].to_sym @type = model[:type] # TODO end |
Instance Attribute Details
#defined_by ⇒ Object (readonly)
Returns the value of attribute defined_by.
6 7 8 |
# File 'lib/renderer/entities/attribute_definition.rb', line 6 def defined_by @defined_by end |
#doc ⇒ Object (readonly)
Returns the value of attribute doc.
6 7 8 |
# File 'lib/renderer/entities/attribute_definition.rb', line 6 def doc @doc end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/renderer/entities/attribute_definition.rb', line 6 def name @name end |
#parent ⇒ Object (readonly)
Returns the value of attribute parent.
6 7 8 |
# File 'lib/renderer/entities/attribute_definition.rb', line 6 def parent @parent end |
#reader_visibility ⇒ Object (readonly)
Returns the value of attribute reader_visibility.
6 7 8 |
# File 'lib/renderer/entities/attribute_definition.rb', line 6 def reader_visibility @reader_visibility end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
6 7 8 |
# File 'lib/renderer/entities/attribute_definition.rb', line 6 def type @type end |
#writer_visibility ⇒ Object (readonly)
Returns the value of attribute writer_visibility.
6 7 8 |
# File 'lib/renderer/entities/attribute_definition.rb', line 6 def writer_visibility @writer_visibility end |
Instance Method Details
#accessor? ⇒ Boolean
18 |
# File 'lib/renderer/entities/attribute_definition.rb', line 18 def accessor? = reader? && writer? |
#reader? ⇒ Boolean
19 |
# File 'lib/renderer/entities/attribute_definition.rb', line 19 def reader? = reader_visibility == :public |
#writer? ⇒ Boolean
20 |
# File 'lib/renderer/entities/attribute_definition.rb', line 20 def writer? = writer_visibility == :public |