Class: MxHero::API::Group
- Inherits:
-
Struct
- Object
- Struct
- MxHero::API::Group
- Defined in:
- lib/resources/group.rb
Overview
A group instance
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#domain ⇒ Object
Returns the value of attribute domain.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(elements) ⇒ Group
constructor
A new instance of Group.
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(elements) ⇒ Group
Returns a new instance of Group.
6 7 8 |
# File 'lib/resources/group.rb', line 6 def initialize(elements) elements.each { |prop, value| send("#{prop}=", value) if respond_to?("#{prop}") } end |
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description
5 6 7 |
# File 'lib/resources/group.rb', line 5 def description @description end |
#domain ⇒ Object
Returns the value of attribute domain
5 6 7 |
# File 'lib/resources/group.rb', line 5 def domain @domain end |
#name ⇒ Object
Returns the value of attribute name
5 6 7 |
# File 'lib/resources/group.rb', line 5 def name @name end |
Instance Method Details
#to_json(*args) ⇒ Object
10 11 12 |
# File 'lib/resources/group.rb', line 10 def to_json(*args) { name: name, domain: domain, description: description }.to_json(*args) end |