Class: Fontist::FontMatch
- Inherits:
-
Object
- Object
- Fontist::FontMatch
- Defined in:
- lib/fontist/font_finder.rb
Overview
Result object for font matches
Instance Attribute Summary collapse
-
#axes ⇒ Object
readonly
Returns the value of attribute axes.
-
#category ⇒ Object
readonly
Returns the value of attribute category.
-
#format ⇒ Object
readonly
Returns the value of attribute format.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#resource ⇒ Object
readonly
Returns the value of attribute resource.
-
#resources ⇒ Object
readonly
Returns the value of attribute resources.
Instance Method Summary collapse
-
#initialize(name:, resource: nil, axes: [], format: nil, category: nil, resources: nil) ⇒ FontMatch
constructor
A new instance of FontMatch.
- #to_h ⇒ Object
Constructor Details
#initialize(name:, resource: nil, axes: [], format: nil, category: nil, resources: nil) ⇒ FontMatch
Returns a new instance of FontMatch.
132 133 134 135 136 137 138 139 140 |
# File 'lib/fontist/font_finder.rb', line 132 def initialize(name:, resource: nil, axes: [], format: nil, category: nil, resources: nil) @name = name @resource = resource @axes = axes @format = format @category = category @resources = resources end |
Instance Attribute Details
#axes ⇒ Object (readonly)
Returns the value of attribute axes.
130 131 132 |
# File 'lib/fontist/font_finder.rb', line 130 def axes @axes end |
#category ⇒ Object (readonly)
Returns the value of attribute category.
130 131 132 |
# File 'lib/fontist/font_finder.rb', line 130 def category @category end |
#format ⇒ Object (readonly)
Returns the value of attribute format.
130 131 132 |
# File 'lib/fontist/font_finder.rb', line 130 def format @format end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
130 131 132 |
# File 'lib/fontist/font_finder.rb', line 130 def name @name end |
#resource ⇒ Object (readonly)
Returns the value of attribute resource.
130 131 132 |
# File 'lib/fontist/font_finder.rb', line 130 def resource @resource end |
#resources ⇒ Object (readonly)
Returns the value of attribute resources.
130 131 132 |
# File 'lib/fontist/font_finder.rb', line 130 def resources @resources end |
Instance Method Details
#to_h ⇒ Object
142 143 144 145 146 147 148 149 150 151 |
# File 'lib/fontist/font_finder.rb', line 142 def to_h { name: name, resource: resource, resources: resources, axes: axes, format: format, category: category, }.compact end |