File tree 3 files changed +5
-13
lines changed
3 files changed +5
-13
lines changed Original file line number Diff line number Diff line change @@ -5,16 +5,16 @@ object Css {
5
5
implicit def strToCssSelector (str : String ) = Selector (str)
6
6
implicit def strToRule (str : String ) = RuleBuilder (str)
7
7
8
- case class Rule (val property : String , val value : String ) {
8
+ case class Rule (property : String , value : String ) {
9
9
override def toString = " \t " + property + " : " + value + " ;\n "
10
10
}
11
11
12
- case class RuleSet (val selector : Selector ,
13
- val rules : List [Rule ]) {
12
+ case class RuleSet (selector : Selector ,
13
+ rules : List [Rule ]) {
14
14
override def toString = selector + " {\n " + rules.mkString + " }\n "
15
15
}
16
16
17
- case class Selector (val selector : String ) {
17
+ case class Selector (selector : String ) {
18
18
19
19
def #> (rules : Rule * ) = RuleSet (this , rules.toList)
20
20
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ object Metadata {
14
14
def publisher (publisher : String ) = Publisher (publisher)
15
15
def rights (license : String ) = Rights (license)
16
16
17
- class Metadata (items : Map [String , MetadataEntry ]) extends PartialFunction [String , MetadataEntry ] {
17
+ class Metadata (val items : Map [String , MetadataEntry ]) extends PartialFunction [String , MetadataEntry ] {
18
18
def toXML = {
19
19
< metadata xmlns: dc= " http://purl.org/dc/elements/1.1/"
20
20
xmlns: dcterms= " http://purl.org/dc/terms/"
Original file line number Diff line number Diff line change 1
1
package epub .toc
2
2
3
- class TOCEntry private [epub] (val label : String ,
4
- val ref : String ,
5
- val children : List [TOCEntry ]) {
6
-
7
- def depth : Int = if (children.isEmpty) 1
8
- else 1 + children.map(_.depth).max
9
- }
10
-
11
3
class TableOfContents private (val entries : List [TOCEntry ]) {
12
4
def depth = entries.map(_.depth).max
13
5
}
You can’t perform that action at this time.
0 commit comments